Database problem with mysql

Database problem with mysql

by Carlos Morales Socorro -
Number of replies: 1
Hello everybody. I have installed a Moodle Server in a Linux Server with Joomla.
Joomla does work but Moodle doesn't.

  • It says:

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

  • The directories are: /var/www, /var/www/moodle and /var/www/jommla.
  • configuration.php for Joomla: (It works!)
$mosConfig_absolute_path = '/var/www/joomla';
$mosConfig_live_site = 'http://www.serverxxx.org/joomla';
  • config.php for moodle: (It doesn't work!)
$CFG->wwwroot = 'http://www.cepdetelde.org/moodle';
$CFG->dirroot = '/var/www/moodle';

Could anyone help me?
Thanks,
Carlos
Average of ratings: -
In reply to Carlos Morales Socorro

Re: Database problem with mysql

by Petr Kalis -
Hi
You have to have running database server (mysql etc) and there created database for Moodle. You are connecting to this database with settings from config.php

(most usually settings for home installations for beginning)
$CFG->dbtype = 'mysql';
$CFG->dbhost = 'localhost';
$CFG->dbname = 'moodle';
$CFG->dbuser = 'root';
$CFG->dbpass = '';
$CFG->dbpersist = false;
$CFG->prefix = 'mdl_';

More info http://docs.moodle.org/en/Installation_FAQ#Error:_database_connection_failed
PK