473,614 Members | 2,342 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2275
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\HTDO CS\testmysql.ph p 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****@westert erp.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\HTDO CS\testmysql.ph p 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
1628
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 php 4.3 version or newer? i'd like to get the osbourne mysql book. the only thought that comes to mind is some things may be deprecated since the php 4.2 book i own was published. i ought to be able to use the net and my new mysql book to...
2
1898
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 and connecting to a MySQL DB into "hello.php" <?php $mysqli = new mysqli("localhost", "my_user", "my_password", "world"); /* check connection */ if (mysqli_connect_errno()) {
0
19271
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 hell of a time with it... The following comes from phpinfo(): PHP Version: 5.1.2 mysql Client API version: 5.0.18 mysqli Client API version: 5.0.18
3
1438
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). However, nothing seems to be working. When I execute the script it does nothing, no error messages, nothing. I know that PHP is working because I've done the phpinfo(); thing and it works. I also know my database is working because I can access it...
18
2238
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
2777
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 code that I am using: <?php function connectDatabase() { $dbhost = 'localhost'; $dbuser = 'root';
11
11083
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 PDO briefly but I've not used the mysqli extension yet. I've read a bit about it though, seems good and more OOP orientated (for the most part). But PDO seems more generic and transferable.
221
367325
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 needs to store entire files, the preferred method is to save the file onto the server’s file-system, and store the physical location of the file in your database. This is generally considered to be the easiest and fastest way to store files. ...
1
2397
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 Ultimate, I'm using iis7 here is the code of the php. <?php $Username = "Webuser"; $Password = "password"; $Database = "sample"; $Hostname = "localhost"; $MySQLConnection = mysql_connect($Hostname, $Username, $Password) ...
0
8197
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8640
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8589
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8287
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
6093
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4058
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2573
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1757
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1438
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.