Mysql 4 1016 error

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
mhouldridge
Forum Contributor
Posts: 267
Joined: Wed Jan 26, 2005 5:13 am

Mysql 4 1016 error

Post by mhouldridge »

Hi,

I have just installed mysql version 4, and have also install navicat which connects fine using localhost, root and the username.

My php connection string is as follows;

Code: Select all

$db = mysql_connect("localhost","root","my password here") or die("Problem connecting");
mysql_select_db("kp") or die("Problem selecting database");
I get the following error, which I have never seen before with previous version of mysql.

Warning: mysql_connect(): Client does not support authentication protocol requested by server; consider upgrading MySQL client in D:\Websites\KPCOM\user_registration2.php on line 262


Any ideas?

:?
Last edited by mhouldridge on Wed Nov 23, 2005 2:27 pm, edited 1 time in total.
User avatar
Jenk
DevNet Master
Posts: 3587
Joined: Mon Sep 19, 2005 6:24 am
Location: London

Post by Jenk »

User avatar
mhouldridge
Forum Contributor
Posts: 267
Joined: Wed Jan 26, 2005 5:13 am

Post by mhouldridge »

Yes, you make a good point.........
.

....
..


...


........... NOT!!!
User avatar
Jenk
DevNet Master
Posts: 3587
Joined: Mon Sep 19, 2005 6:24 am
Location: London

Post by Jenk »

Care to read that link I posted, which is the first link found if you google the error message, hence if you pushed the "I'm feeling lucky" button instead, would take you straight to it?

Then comment, thanks.
Charles256
DevNet Resident
Posts: 1375
Joined: Fri Sep 16, 2005 9:06 pm

Post by Charles256 »

seriously. the link does have some good info in it:) I read it myself because I wasn't sure what was happenning myself.
User avatar
mhouldridge
Forum Contributor
Posts: 267
Joined: Wed Jan 26, 2005 5:13 am

Post by mhouldridge »

Hi,

My apolgies.

Thanks for the info, I will take a look.
User avatar
mhouldridge
Forum Contributor
Posts: 267
Joined: Wed Jan 26, 2005 5:13 am

Post by mhouldridge »

One more thing which you might be able to help me with.

MY data folder for the new database, "KP" is not showing any myd / myi files, just users.frm, homes.frm and db.opt


Is this right?
User avatar
AKA Panama Jack
Forum Regular
Posts: 878
Joined: Mon Nov 14, 2005 4:21 pm

Post by AKA Panama Jack »

I will bet dollars to donuts you didn't upgrade the Mysql Client from 3.xx to the same version as the new Server software. I have found that too many people who have this problem only upgrade the server software for Mysql because they think that is all that is needed. :) Basically you have to upgrade everything.

You can usually enter the following line from the CLI on the server.

Code: Select all

rpm -qa | grep -i mysql
That will usually show you what packages have been installed for mysql on your server. You should get something like this...

Code: Select all

MySQL-Max-4.1.10-0
MySQL-shared-compat-4.1.10-0
MySQL-server-4.1.10-0
MySQL-embedded-4.1.10-0
MySQL-client-4.1.10-0
MySQL-devel-4.1.10-0
If the client version (4.1.10 in the example) doesn't match the server version (4.1.10) then you will get the message Warning: mysql_connect(): Client does not support authentication protocol requested by server; consider upgrading MySQL client
User avatar
AKA Panama Jack
Forum Regular
Posts: 878
Joined: Mon Nov 14, 2005 4:21 pm

Post by AKA Panama Jack »

mhouldridge wrote:One more thing which you might be able to help me with.

MY data folder for the new database, "KP" is not showing any myd / myi files, just users.frm, homes.frm and db.opt


Is this right?
If you are using INNODB instead of MYISAM database types then you will only have frm files in the database directories. INNODB stores database data in ibdata files in the mysql main directory.
User avatar
mhouldridge
Forum Contributor
Posts: 267
Joined: Wed Jan 26, 2005 5:13 am

Post by mhouldridge »

Hi,

My local cui is Navicat, and my local mysql is version 4.

My server version runs mysql front, which will not allow access to the data files for kp database. It shows them as users.innoDB and homes.innoDB.


Does mysql 4 or NAvicat create or store databases in innoDB format rather than myi / myd?


Thanks for the help so far
User avatar
AKA Panama Jack
Forum Regular
Posts: 878
Joined: Mon Nov 14, 2005 4:21 pm

Post by AKA Panama Jack »

The table type is whatever you told Mysql to use. The default is normally MYISAM. Some people use INNODB because it can be more reliable. MYISAM tables usually need to be optimised on a regular bases to recover lost space, clear overhead and speed them up. Thought INNODB tables tend to use more memory as a trade off for being more reliable.

And if you have the ability I would change to PHPMyAdmin as it is free and definately looks better than the commercial product NAvicat. The online manual for NAvicat is almost completely useless as it is limited, very hard to find anything and when you do there isn't much information. (shudder)

Mysql will allow you to change any table from MYISAM to INNODB and back again. So look for that option in NAVicat as PHPMyAdmin allows you to do it so NAVicat should have it.

Oh, and I just remembered this...

Your server will need to have Mysql MAX installed to be able to access INNODB Mysql databases.
User avatar
mhouldridge
Forum Contributor
Posts: 267
Joined: Wed Jan 26, 2005 5:13 am

Post by mhouldridge »

Interesting...

I have reconfigured mysql 4 server to accept innodb database (multifunctional)..

Fingers crossed this will work..
User avatar
mhouldridge
Forum Contributor
Posts: 267
Joined: Wed Jan 26, 2005 5:13 am

Post by mhouldridge »

Arrgh!!

Still not working..

I have installed the same version of mysql on the server including the same version of Navicat.

Also, I ftp'd the kp directory (my database files) to the server which NAvicat has picked up, however when I try to view anything i get 1016 error.

I havent come accross database corruption of tables which have no data before, and I know most of the solutions to this error relate to corruption.


Please help.
Post Reply