moodle install window appears when site restoring

moodle install window appears when site restoring

Cham Pereira發表於
Number of replies: 3

Due to some missing assignment issue I had to restore entire site backup which was taken  last august.

I have created test server with same configurations  and copied all the files and re installed the database. I have set the site into a local ip address and changed all the configurations accordingly. 

but when i tried to open the moodle site. It appears the installation screen instead of the expected login screen. 

any ideas about the things that I needed to check ??

評比平均分數: -
In reply to Cham Pereira

Re: moodle install window appears when site restoring

Leon Stringer發表於
Core developers的相片 Particularly helpful Moodlers的相片

Moodle cannot see the expected tables in the database specified by $CFG->dbname. Check the database settings in config.php are correct, for example:

$CFG->dbtype    = 'mariadb';      // 'pgsql', 'mariadb', 'mysqli', 'sqlsrv' or 'oci'

$CFG->dbhost    = 'localhost';  // eg 'localhost' or 'db.isp.com' or IP
$CFG->dbname    = 'moodle';     // database name, eg moodle
$CFG->dbuser    = 'username';   // your database username
$CFG->dbpass    = 'password';   // your database password
$CFG->prefix    = 'mdl_';       // prefix to use for all table name

If it still doesn't work, here's some information about the tables Moodle is looking for to help troubleshoot this.

評比平均分數:Useful (1)
In reply to Cham Pereira

Re: moodle install window appears when site restoring

Visvanath Ratnaweera發表於
Particularly helpful Moodlers的相片 Translators的相片
Did you restore the database dump as explained in https://docs.moodle.org/en/Site_restore#Restore_with_phpMyAdmin which you made during during the https://docs.moodle.org/en/Site_backup ?
評比平均分數:Useful (1)
In reply to Visvanath Ratnaweera

Re: moodle install window appears when site restoring

Cham Pereira發表於
Dear Visvanath,
Thanks a lot for all the very important point. That worked really well. I would like to share the story because that might be helpful for someone else in another day.

We have separated servers apache and db in our production. In this particular scenario I was using VM image backups that we have taken in last august. So with out putting much effort I have installed apache on db server because it is for a very short time. Hence in the config.php I have changed only the db host ip. Then added privileges to db user to access the locally hosted db.

because of your comments I tried to login with specified db user and view whether data tables are visible. There I have realized even though I was able to login to maria db with username and password , moodle data tables were not visible. Most probably issue with database privileges.

Then I have created another user and assigned moodle db privileges , moodle backup works like charm.

Thanks a lot Visvanath for the prompt response.