We help IT Professionals succeed at work.

Joomla Server Move caused Unable to connect to MySQL database

Last Modified: 2012-05-11
I had a working Joomla website hosted by a web-hosting company. I agreed to let them upgrade the site from legacy servers to their grid.

Since the move I have gotten this when I try to access the site: Database Error: Unable to connect to the database:Could not connect to MySQL

I believe the site is on Joomla 1.5.7

The hosting support guy said there was some problem with the database password when migrating to the grid and had me change to a new password.  

I changed it to a new password with their control panel and was able to view the database using phpMyAdmin.

I updated the password in the configuration.php file to match but it didn't help. I double-checked that the $host still matched the hosting company's control panel information and the user had not changed either.

This morning I thought maybe there was some other file with the password I was missing so I tried changing back to the original password in the control panel. It let me change it in the control panel but phpMyAdmin did not change and I couldn't log in.

So at this point I went back to the "new" password and have the configuration.php file using it and can get in to phpMyAdmin with it. I'm still getting the unable to connect to MySQL message though from the site.

Is there anything else I can check? Is there some way to make sure the grid can see my database server? Could there be some incompatibility between my Joomla 1.5 and the version of something else (the hosting company is only offering 1.6 for download now)?

Thanks for your help and ideas.
Watch Question

Unlock this solution and get a sample of our free trial.
(No credit card required)


Thanks for your suggestions. I am looking into them.

One question I had was what privilege the user_privilege table should have? Mine had USAGE. The Schema_privilege table had all the privileges.


That wasn't the whole problem but you got me looking in the right direction.  It turns out the server they moved my website to didn't have access to the database server.

I had to create a new database, export from the old database and import into the new database. Then I updated the configuration.php file with the new server, database, user and password.

Thanks for your suggestions. They did help a lot!
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a sample view!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.


Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.