Jump to content

Recommended Posts

Posted

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".

 

Moodle_Error.JPG

 

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?

Posted
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).
Posted

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,

Moodle_DB.JPG

 

Please check and suggest if I miss anything.

Posted

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.

Posted

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.

Moodle_DB1.JPG

 

$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.

Posted

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.

 

php.JPG

Posted

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;

myini.JPG

 

Please check and suggest if I missed anymore data.

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 account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...