Jump to content

MySQL Pre 4.1 'insecure authentication' Upgrading Effects


morrisjohnny

Recommended Posts

I'm currently working for a company who i'm assuming have a pre 4.1 MySQL as when i'm trying to connect with PHP 5.3.8 and it is complaining about the insecure authentication

Warning: mysql_connect() [function.mysql-connect]: mysqlnd cannot connect to MySQL 4.1+ using the old insecure authentication. Please use an administration tool to reset your password with the command SET PASSWORD = PASSWORD('your_existing_password'). This will store a new, and more secure, hash value in mysql.user. If this user is used in other scripts executed by PHP 5.2 or earlier you might need to remove the old-passwords flag from your my.cnf file in C:\xampp\htdocs\test\connection_test.php on line 2Could not connect: mysqlnd cannot connect to MySQL 4.1+ using the old insecure authentication. Please use an administration tool to reset your password with the command SET PASSWORD = PASSWORD('your_existing_password'). This will store a new, and more secure, hash value in mysql.user. If this user is used in other scripts executed by PHP 5.2 or earlier you might need to remove the old-passwords flag from your my.cnf file
Now i've noticed you need to run the following command
SET old_passwords = 0;UPDATE mysql.user SET Password = PASSWORD('testpass') WHERE User = 'testuser' limit 1;SELECT LENGTH(Password) FROM mysql.user WHERE User = 'testuser'; FLUSH PRIVILEGES;

However considering this database is accessed by a number of different systems if I run this command for one of the users will this affect all other users? as i'm not 100% certain what other software connect to this database (I know of 2 others). Without downgrading PHP or upgrading MySQL what other options do I have?create a new user just for PHP and run the command? or will it affect others users?

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...