470,641 Members | 1,543 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,641 developers. It's quick & easy.

Mysql or mysqli ?

I noticed both dlls in the package. I read MySQLi offers Improved MySQL
support when using MySQL 4.1 or higher
Can anyone tell me in layman's terms why and when I want to use this instead
of 'plain' mysql ?
What features do I get extra ? I have MySQl 4.0.20, according to MySQL site
the latest stable/production release.
Is MySQL 4.1 recommendable ? Should I be implementing everything with MySQLi
from now on anyway ?

Thanks in advance for your opinions & explanations!
Pjotr
Jul 17 '05 #1
2 2152
I have just upgraded my MySQL 4.0.20 to 4.1.3 on my development PC and I
have discovered one important fact - to access MySQL 4.1.3 or higher you
must use the 'mysqli_' functions as the ordinary 'mysql_' functions do not
work. If you try you will get the following message:

Warning: mysql_connect(): Client does not support authentication protocol
requested by server; consider upgrading MySQL client in
F:\Apache2\HTDOCS\testmysql.php on line 28 Could not connect to MySQL

It is also not possible to access a pre-4.1.3 database with the new
'mysqli_' functions. So when you upgrade to version 4.1.3 of MySQL you must
also upgrade your PHP code. For a lot of people this could be a major
problem but for me it is a simple matter - my code can auto-detect which
MySQL extension is installed then include() the relevant class file at
runtime. I have one class file for the 'mysql_' extension and another for
the 'mysqli_' extension.

This is one big advantage of the 3 tier architecture with its separate data
access component.

--
Tony Marston

http://www.tonymarston.net

"Pjotr Wedersteers" <x3****@westerterp.com> wrote in message
news:41***********************@news.xs4all.nl...
I noticed both dlls in the package. I read MySQLi offers Improved MySQL
support when using MySQL 4.1 or higher
Can anyone tell me in layman's terms why and when I want to use this
instead
of 'plain' mysql ?
What features do I get extra ? I have MySQl 4.0.20, according to MySQL
site
the latest stable/production release.
Is MySQL 4.1 recommendable ? Should I be implementing everything with
MySQLi
from now on anyway ?

Thanks in advance for your opinions & explanations!
Pjotr

Jul 17 '05 #2
I have just upgraded my MySQL 4.0.20 to 4.1.3 on my development PC and I
have discovered one important fact - to access MySQL 4.1.3 or higher you
must use the 'mysqli_' functions as the ordinary 'mysql_' functions do not
work. If you try you will get the following message:
Here's a solution for the problem you mentioned, may be useful for some
people that aren't willing to switch to mysqli.
http://dev.mysql.com/doc/mysql/en/Old_client.html
Warning: mysql_connect(): Client does not support authentication protocol
requested by server; consider upgrading MySQL client in
F:\Apache2\HTDOCS\testmysql.php on line 28 Could not connect to MySQL


kind regards,
David
Jul 17 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by j-marvin | last post: by
2 posts views Thread by NevrGivUp | last post: by
3 posts views Thread by yes_its_just_me | last post: by
18 posts views Thread by Bruce A. Julseth | last post: by
9 posts views Thread by christopher_board | last post: by
11 posts views Thread by macca | last post: by
1 post views Thread by Korara | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.