Skip navigation links

MySQL Forums :: PHP :: php 5.4 and 'passwords' for MySQL 5.xx DB


Advanced Search

php 5.4 and 'passwords' for MySQL 5.xx DB
Posted by: Evan Cooch ()
Date: March 27, 2012 12:07PM

I'm running MySQL 5.0.9 on a basic LAMP server. Main use is to support a php-based BB forum. Thought I'd test out php 5.4.0. php 5.3.10 is currently working fine, but there are some performance enhancements with php 5.4.0 that I thought I'd try out.

Did the 5.4.0 compile, installed, no muss no fuss, but when tried to access the DB using the board, got the following MySQL error:

SQL ERROR [ mysql4 ]

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 [2000]


I'm a complete mySQL newbie (in the sense that I don't use it for anything other than supporting the BB system). In reading the 'error instructions' (above), am I correct in assuming that I should do the following?

Say my current mySQL password is 'abcd1234', with a dbname of 'test-forum'

Presumably, then, it's a simple sequence of

step 1\ mysql --user=root --password=abcd1234 test-forum

step 2\ > SET PASSWORD = PASSWORD('abcd1234')

step 3\ Then, presumably, I go into my.cnf, and comment out the old_passwords=1 line

Correct?

Thanks! I can count on 1-2 fingers how many times I've actually had to 'pass commands' to MySQL. I'd rather not do something completely silly, and render the DB completely inaccessible (or unrecoverable).

Thanks in advance...

Options: ReplyQuote


Subject Written By Posted
php 5.4 and 'passwords' for MySQL 5.xx DB Evan Cooch 03/27/2012 12:07PM
Re: php 5.4 and 'passwords' for MySQL 5.xx DB David Bagnara 04/14/2012 07:39PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.