Transfer db from 3.9LTS to 4.1LTS

Transfer db from 3.9LTS to 4.1LTS

by Thomas Barna -
Number of replies: 1
I have to transfer my old production Moodle 3.9 LTS db (mysql 5.7) to a new server that will run Moodle 4.1 LTS and mysql 8.0.
The old db does not have full UTF-8 support which the new server does.

Do I have to make the old db full UTF-8 compliant before exporting or can I just grab it as it is and import to the new server?
This is my current old db:
mysql> SELECT @@character_set_database, @@collation_database;
+--------------------------+----------------------+
| @@character_set_database | @@collation_database |
+--------------------------+----------------------+
| latin1                   | latin1_swedish_ci    |
+--------------------------+----------------------+
1 row in set (0.00 sec)
mysql> SHOW GLOBAL VARIABLES WHERE variable_name IN ('innodb_file_format', 'innodb_large_prefix', 'innodb_file_per_table');
+-----------------------+-----------+
| Variable_name         | Value     |
+-----------------------+-----------+
| innodb_file_format    | Barracuda |
| innodb_file_per_table | ON        |
| innodb_large_prefix   | ON        |
+-----------------------+-----------+ 3 rows in set (0.00 sec) mysql>

ShouId maybe use the 'mysql_collation.php' and 'mysql_compressed_rows.php' scripts first?
Any feedback and suggestions are welcome.

Thanks.

Average of ratings: -
In reply to Thomas Barna

Re: Transfer db from 3.9LTS to 4.1LTS

by Ken Task -
Picture of Particularly helpful Moodlers
Yes, look at/run those scripts first, plus one more:
mysql_engine.php

'SoS', Ken