Joomla: Database Error: Unable to connect to the database:Could not connect to MySQL
Joomla uses a database. If for some reason it cannot connect to the database, you may get this message:
Database Error: Unable to connect to the database:Could not connect to MySQL
In configuration.php (located in the folder where Joomla is installed) you will find these settings for connecting to the database:
var $host = 'localhost'; // This is always localhost
var $user = 'XXX_ZZZ'; // XXX is the name of the control panel user, ZZZ the database user
var $db = 'XXX_YYY'; // XXX is the name of the control panel user, YYY the name of the database
var $password = 'wachtwoord'; // The password you assigned to the database user
If you cannot connect, something may be wrong with the details above.
Log in to the control panel and choose the MySQL menu. Then choose the Joomla database (click on it), where the existing database users are shown. If necessary, create a new database user and enter that username and password in configuration.php. If the database user already exists, change the password to be safe so that it also matches configuration.php.
If you installed Joomla via Installatron, you can also find the name of the database via Installatron.
