Jump to content

MySQL Pre 4.1 'insecure authentication' Upgrading Effects


morrisjohnny
 Share

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?

Edited by morrisjohnny
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...