Installing and upgrading help

Question regarding mysql dump restore (DEFINER)

This discussion has been locked because a year has elapsed since the last post. Please start a new discussion topic.
Picture of Judy Hsu
Re: Question regarding mysql dump restore (DEFINER)

Hi Christoph, I don't think that's the source of the problem. But thanks again for your help.

OK after I did some research, I did a sed find and replace and I think I was able to restore the database correctly (not 100% sure). I was able to login to mysql, select archive (DB), and do a "select * from mdl_user" and see a lot of data in there. So this is good I think.

Now another problem comes up. I then tried to "merge" with the original config.php that came with the hosting company (when we did the rsync), with a generic Moodle 1.9.19+ config.php.

[The OLD config.php came with the rsync]:



$CFG->dbtype = 'mysqli';

$CFG->dbhost = '';

$CFG->dbname = 'moodle_users';

$CFG->dbuser = 'moodle_admin';

$CFG->dbpass = 'CCCCCCCCC';

$CFG->prefix = 'mdl_';

$CFG->dbpersist = false;

$CFG->wwwroot = '';

$CFG->dirroot = '/home/moodle/public_html';

$CFG->dataroot = '/home/insight2/moodledata';

$CFG->passwordsaltmain = 'bQ3?RzZuxxxxxxxxxxxxxxxx':



[The Generic typical config.php after you install Moodle 1.9.19+]

(skipped, very similar to the one below)

[The "merged" config.php]



$CFG = new stdClass();

$CFG->dbhost = 'localhost';

$CFG->dbname = 'archive';

$CFG->dbuser = 'root';

$CFG->dbpass = 'xxxxxxx';   //the DB root password

$CFG->dbpersist = false;

$CFG->prefix = 'mdl_';

$CFG->wwwroot = '';

$CFG->dirroot = '/var/www/archive';

$CFG->dataroot = '/var/moodledata/archive';

$CFG->admin = 'admin';

$CFG->directorypermissions = 00777;

$CFG->passwordsaltmain = 'xxxxxxxxxxxxxxxxxxxxxxxx';


So, when I go into the web browser and type in the new URL, it will NOT display anything, and I have don't know how to further troubleshoot. I guess my questions are:

1. For the "passwordsaltmain" should I be using the "old" one that came with the hosting company rsync, or should I comment it out, or even use my own (that is generated when a blank archive DB was created)??

2. I assume that the default "root" user for MySQL would have access to all databases with all the privileges, right? so when I changed the dbname and dbuser and dbpass I should be using the "new" MySQL DB one (and NOT using the old config.php), right?

3. Anything else that I might have done wrong?

Thanks you!

Average of ratings: -