Error: Moodle could not connect to the database. It's possible the database itself is just not working at the moment. The admin should also check that the database details have been correctly specified in config.php

Error: Moodle could not connect to the database. It's possible the database itself is just not working at the moment. The admin should also check that the database details have been correctly specified in config.php

by Hugo Pablo Leyva -
Number of replies: 1
 Hello! 

    I have working moodle 1.3 in Red Hat 6.2 with Postgresql 7.1 and  Apache1.3

  The server where this already It arrive at limits and this very slow. 

   Buy it a server of much greater resources.

 I am making the migration to the new server. 

The Server new account with Red Hat Enterprise 3.0, Postgresql is 7.3 and Apache  2.0

First I tested in another equipment with less capacity and he installs the same version to him of Red Hat, Postgresql and Apache of the new server. 

In this equipment already it obtains that it worked.  In order to migrate it copies the directories moodle and moodledata of the server with Red Hat 6.2 to the other equipment. 

Remove an backup from Postgresql and it download it in the other equipment. 

In the server where it is going to be in production it marks the following error when trying to prove it. 

Error:  Moodle could not connect to the database

Possible It's the database itself is just not working AT the moment. 

The admin should also check that the database details have been correctly specified in config.php

Postgresql is up

The file of connectivity of postgresql has the local lines

local   all         moodleuser,postgres    trust
host    all         moodleuser,postgres         127.0.0.1         255.255.255.255   trust
host    all         moodleuser,postgres         IP_SERVER         255.255.255.255   trust
hostssl    all         moodleuser,postgres         127.0.0.1         255.255.255.255   trust
hostssl    all         moodleuser,postgres         IP_SERVER         255.255.255.255   trust

Thw file config.php is

$CFG->dbtype    = 'postgres7';       // mysql or postgres7 (for now)
$CFG->dbhost    = 'MY_hostname';   // eg localhost or db.isp.com
$CFG->dbname    = 'database';      // database name, eg moodle
$CFG->dbuser    = 'moodleuser';    // your database username
$CFG->dbpass    = 'password';    // your database password
$CFG->prefix    = 'mdl_';        // Prefix to use for all table names
                                                                               

If attempt to connect me to the data base using  commandos of postgresql it working

 $ psql base_de_datos -u
   Username:moodleuser
   Password:......

That I lack myself to take into account? 

After it works migrates later to version 1,4 and to 1,5

Thanks!
Average of ratings: -
In reply to Hugo Pablo Leyva

Re: Error: Moodle could not connect to the database. It's possible the database itself is just not working at the moment. The admin should also check that the database details have been correctly specified in config.php

by Hugo Pablo Leyva -
Hi!

   It already fixes it.  They lacked librerias of php

Thanks!