Moodle Server migration issue

Moodle Server migration issue

by Adam Latrache -
Number of replies: 4

Hi all


I recently upgraded my server sue to needing more storage space. There is problem when exporting the moodle database from the old server and then reinstalling it on the new server. 

Steps taken so far: 

1. Exported the database in PHPmyAdmin from old server.

2. Created a new database with same name and user and same password in new server. 

3. Checked config file to check the database password matched

4. imported backup moodle database to new server via PHPmyAdmin. 

5 Error message returned (see image) 

Any advice and guidance would be great. 








Adam


 Database error message

 

Average of ratings: -
In reply to Adam Latrache

Re: Moodle Server migration issue

by Leon Stringer -
Picture of Core developers Picture of Particularly helpful Moodlers

It looks like MySQL (or MariaDB) on the new server hasn't been configured with the large index size needed for full UTF-8 support. Run the SQL query SHOW GLOBAL VARIABLES WHERE variable_name IN ('innodb_file_format', 'innodb_large_prefix', 'innodb_file_per_table') in phpMyAdmin. If the results don't match the expected output, configure the database as needed.

Average of ratings: Useful (2)
In reply to Leon Stringer

Re: Moodle Server migration issue

by Adam Latrache -
Hi Leon and Ken

Thank you for your reply. Very useful. Our Moodle installation is staged on a shared host. All that was needed was the innodb_large_prefix to be switched to 'enable'. However, the host literally said that they will not do this. I think we will have to seek alternative hosting solutions for our moodle as the options to solve this issue are limited.

Thank you both for you advice.

Adam
In reply to Adam Latrache

Re: Moodle Server migration issue

by Ken Task -
Picture of Particularly helpful Moodlers

In addition to Leon's help ...

If the DB user/password in config.php can alter DB/Tables/Columns of the DB for the moodle, there are some command line scripts in code/admin/cli/ that will help with DB setup.

mysql_collation.php, mysql_compressed_rows.php, and mysql_engine.php.

They all have help if called with no options and you should be able to add the switches options by reading the help.

And one can temp get by with global set commands via mysql client ... but best if new requirements set in my.cnf ... mysql service restart there after.

'SoS', Ken


Average of ratings: Useful (1)