473,394 Members | 1,702 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

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 2264
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: j-marvin | last post by:
hi- i have a book on mysql written for version 4 that has hard to read screen shots. i'd like to get a newer mysql book. do i have to worry about the version number of mysql i am using if i use...
2
by: NevrGivUp | last post by:
Hello. I am in the process of learning php. I am particularly interested in its uses with MySQL. I have Apache 2 and PHP5 both installed and working fine. I pasted a MySQLi example for opening...
0
by: IamtheEvster | last post by:
Hi All, I am currently using PHP 5 and MySQL 5, both on Fedora Core 5. I am unable to call a MySQL stored procedure that returns output parameters using mysql, mysqli, or PDO. I'm having a...
3
by: yes_its_just_me | last post by:
Hi everyone, I haven't used PHP since version 4 and am trying to use it for a new project. All I'm trying to do is connect to a MySQL database and show the contents of that database (as a start)....
18
by: Bruce A. Julseth | last post by:
I have the following code $Host = "localhost"; $User = "Fred"; $Database = "house"; $Password = "mypw" echo "before mysqli<br />Host: " . $Host . "<br />" . $User . "<br />" . $Database;
9
by: christopher_board | last post by:
Hi all. I am trying to write a php page which connects to a MySQL Database which is supposed to get the results from a table within a database and display the results in a table. Below is the...
11
by: macca | last post by:
Hi, What should I be using for general MySQL database access? I've been using the traditional mysql extension for ages, but I'm trying to update my style to a more OOP paradigm. I've used...
221
Atli
by: Atli | last post by:
You may be wondering why you would want to put your files “into” the database, rather than just onto the file-system. Well, most of the time, you wouldn’t. In situations where your PHP application...
1
by: chanshaw | last post by:
Alright so I got php running and installed i have mysql running and installed the thing im having a hard time with is having the php to call information from the mysql database. Im on Windows Vista...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.