Hello all!
I have been trying to install Moodle 2.4 on my website and at the 'Database settings step', I keep getting this error every time I try to go forward:
"Error: Database connection failed
It is possible that the database is overloaded or otherwise not running properly.
The site administrator should also check that the database details have been correctly specified in config.php
Warning: mysqli::mysqli(): (28000/1045): Access denied for user 'seniorwa_pranay'@'localhost' (using password: YES) in /home/seniorwa/public_html/moodle/lib/dml/mysqli_native_moodle_database.php on line 76"
Contrary to what they say on the documentation page, the setup does not create a config.php file.
I did edit the config-dist.php file to enter all the required details like my database name, the database username, the password etc.
Upon reading suggestions on the Installation support page, I tried 2 approaches:
i. Renaming the config-dist.php file to config.php, which leads to the installation not starting at all and a database connection error at the outset.
ii. Tried keeping both files, config-dist.php and config.php in the Moodle directory, which leads to the same error as I've mentioned above in orange.
I have set the following parameters in my config.php and config-dist.php (they are identical)
$CFG->dbtype = 'mysqli'; // 'pgsql', 'mysqli', 'mssql', 'sqlsrv' or 'oci'
$CFG->dblibrary = 'native'; // 'native' only at the moment
$CFG->dbhost = 'localhost'; // eg 'localhost' or 'db.isp.com' or IP
$CFG->dbname = 'seniorwa_moodle'; // database name, eg moodle
$CFG->dbuser = 'seniorwa_pranay'; // your database username
$CFG->dbpass = '<system generated password>'; // your database password
$CFG->prefix = 'mdl_';
CFG->dboptions = array(
'dbpersist' => false,
'dbsocket' => false,
'dbport' => '',
);
$CFG->wwwroot = 'http://seniorsoncall.co.in/moodle';
$CFG->dataroot = '/home/seniorwa/moodledata';
$CFG->directorypermissions = 02777;
$CFG->admin = 'admin';
require_once(dirname(__FILE__) . '/lib/setup.php');
Can anyone share a working config.php or config-dist.php file with me and tell me how to get this config vs config-dist issue sorted?
I have been at this since a couple of days now and would really appreciate any kind of help or guidance from anyone on this.
Thank you!