Rajasekhar_K Posted May 14, 2019 Posted May 14, 2019 I have installed Moodle 3.6.3 version on local using XAMPP(V3.2.2). Now, I want to backup and migrate my moodle site to live domain. So, First I had tried the process on local by following moodle docs(https://docs.moodle.org/36/en/Moodle_migration). After completion of the process and while accessing the site I am getting an error as "Error reading from database". FYI - config.php data as below; <?php // Moodle configuration file unset($CFG); global $CFG; $CFG = new stdClass(); $CFG->dbtype = 'mariadb'; $CFG->dblibrary = 'native'; $CFG->dbhost = 'localhost'; $CFG->dbname = 'migmoodle'; $CFG->dbuser = 'root'; $CFG->dbpass = ''; $CFG->prefix = 'mdl_'; $CFG->dboptions = array ( 'dbpersist' => 0, 'dbport' => '', 'dbsocket' => '', 'dbcollation' => 'utf8mb4_unicode_ci',); $CFG->wwwroot = 'http://localhost/migmoodle'; $CFG->dataroot = 'C:\\xampp\\migmoodledata'; $CFG->admin = 'admin'; $CFG->directorypermissions = 0777; require_once(__DIR__ . '/lib/setup.php'); Can anyone know answer for this?
3s-gtech Posted May 14, 2019 Posted May 14, 2019 Have you set the permissions correctly on the new database? If it's a new DB, the specified user won't necessarily have the correct permissions (as I found out when migrating our Joomla across DBs).
Rajasekhar_K Posted May 14, 2019 Author Posted May 14, 2019 Yes, I had set the permissions correctly i.e, a root user with all privileges without password, same you can able to see in the topic section. FYI - Check image, Please check and suggest if I miss anything.
mdrabble Posted May 14, 2019 Posted May 14, 2019 Noticed on your config the sql root password is blank - is that just posting purposes or is it actually blank? Wondering if xamp sql is set to not allow blank passwords.
Rajasekhar_K Posted May 14, 2019 Author Posted May 14, 2019 Hi, Thanks for your reply. FYI - Yes, the password is blank for root user. Even it worked fine while installing moodle on local. Anyway, even I tried with a new user with password as below, still I am getting the same error. $CFG->dbtype = 'mariadb';$CFG->dblibrary = 'native';$CFG->dbhost = 'localhost';$CFG->dbname = 'migmoodle';$CFG->dbuser = 'admin';$CFG->dbpass = 'password';$CFG->prefix = 'mdl_';$CFG->dboptions = array ( 'dbpersist' => 0, 'dbport' => '', 'dbsocket' => '', 'dbcollation' => 'utf8mb4_unicode_ci',); Still the same issue, please suggest.
Cache Posted May 14, 2019 Posted May 14, 2019 That looks like phpmyadmin for a mysql database - your DBtype is set to Mariadb is that correct?
Rajasekhar_K Posted May 16, 2019 Author Posted May 16, 2019 Yes it is correct! phpmyadmin is supports dytype mariabd also. Even it worked when installing fresh moodle. FYI - phpMyAdmin is a web-based tool that allows webmasters and students manage MySQL or MariaDB databases.
mdrabble Posted May 16, 2019 Posted May 16, 2019 What version of Moodle/Database are you migrating from? Could be the database format for MariaDB requires Barracuda for later versions of Moodle The link below explains how to make xamp use the required DB Format. See - https://moodle.org/mod/forum/discuss.php?d=350838#p1457590
Rajasekhar_K Posted May 17, 2019 Author Posted May 17, 2019 FYI - I had installed Moodle on local and the version is 3.6.3. And I am trying to migrate the moodle on local itself as a practice and to know the correct process for future references. Yes, when installing V3.6.3 I got barracuda error and I had updated the required data in my.ini Please check below screenshot; Please check and suggest if I missed anymore data.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now