Error on migrating website : Database Error: Unable to connect to the database:Could not connect to MySQL

146 Views Asked by At

As a young developer, my first task is to migrate a website on another server. I was thinking it will take me less than 2 days but no. The website was made with PHP 5.6 with the CMS Joomla! 1.5. I've migrate the sources, but when I try the page, I got the message:

Database Error: Unable to connect to the database:Could not connect to MySQL

I've tried multiples manipulations:

  • I have installed Plesk Onyx for do the migration, but same message

  • I have tried with Plesk 12.5, but same,

  • I have tried by copiing sources manually on the serv, it didn't work too

  • I have check my LAMP server, the php test is okey, the mysql (MariaDB) too, and Apache2 test is okey.

  • I have already edit the configuration.php file, but it's the same problem.

  • I have tested on another OS for my server (last one was Debian), now I have installed centos 7, but I don't change anything.

Don't know what's wrong with my migration, if somebody have and idea, I'm listening

1

There are 1 best solutions below

3
Seth Warburton On

The answer is in the error message Joomla gave you. The details you've set for accessing the database are wrong.

Did you create a MySQL database for your new site? Did you import the database from the old site to the new server?