Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.
As mentioned this worked fine when we were using php version 5.2.x on the shared hosting environment. But now that we have upgraded, our joomla site fails to connect to the database. Since joomla doesn't actually give you the mysql error I wrote a short php script to print out the error it's encountering and found this:
~$ mysql --version mysql Ver 14.12 Distrib 5.0.77, for redhat-linux-gnu (x86_64) using readline 5.1
this occurs on the call to mysql_connect ('server', 'user', 'pass'). So taking advice from the error message I went ahead and created a new user for the database (making sure to specify the correct host) in the fashion:
Failed 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
Where 'xxxhash' was replaced with the hash returned by "select password ('xxx');". Then I replaced the values in my test script on the shared hosting environment, and tried to connect again. To no avail, the same exact problem. I also just tried resetting the user's password using:
create user 'xxx'@'xxx' identified by password 'xxxhash'; grant all on xxx.* to 'xxx'@'xxx' identified by password 'xxxhash';
Also to no avail, and the same problem again. I'm really kinda stumped as to what is causing this. Can anyone shed some light?
set password for 'xxx'@'xxx' = password ('xxx');
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
Join the community of 500,000 technology professionals and ask your questions.