Comments - Migrate from MySQL 8 to MariaDB 10.3.24 - HowTo?

 
4 years ago Max Pol

I checked your link and especially the section "Upgrading from MySQL to MariaDB".

For Windows there stands: Upgrading on Windows On Windows, you should not uninstall MySQL and install MariaDB, this would not work, the existing database will not be found.

Thus On Windows, just install MariaDB and use the upgrade wizard which is part of installer package and is launched by MSI installer. Or, in case you prefer command line, use mysql_upgrade_service <service_name> on the command line.

I downloaded and installed the version 10.3.24 - but i can not see any upgrade wizard during the installation process... Why is this wizard not showing up or - am i using a false version?

Used this download link: https://downloads.mariadb.org/mariadb/10.3.24/

 
4 years, 1 month ago Vladislav Vaintroub

the question is what exactly was not working properly?

usually, one can take mysqldump to export database, and mysql client to import. And there are tutorials on that e.g https://blog.winhost.com/using-mysqldump-to-backup-and-restore-your-mysql-databasetables/

 
4 years ago Max Pol

I now installed mariadb 10_3_24 and opened the db with the mysql workbench tool

There i tried to import my previous exported db and content from mysql 8 (tried it for only one table and also for the whole database with all tables)

I got this error messages when i tried to im port the db:

19:00:21 Restoring C:\DOWNLOAD\stock_main.sql Running: mysql.exe --defaults-file="c:\users\polzi\appdata\local\temp\tmpdp427k.cnf" --protocol=tcp --host=localhost --user=root --port=3306 --default-character-set=utf8 --comments --database=stockdb < "C:
DOWNLOAD
stock_main.sql" ERROR 1253 (42000) at line 1: COLLATION 'utf8_general_ci' is not valid for CHARACTER SET 'utf8mb4'

Operation failed with exitcode 1 19:00:21 Import of C:\DOWNLOAD\stock_main.sql has finished with 1 errors

19:01:42 Restoring C:\TEMP\all-databases.sql Running: mysql.exe --defaults-file="c:\users\polzi\appdata\local\temp\tmphwlsvz.cnf" --protocol=tcp --host=localhost --user=root --port=3306 --default-character-set=utf8 --comments --database=stockdb < "C:
TEMP
all-databases.sql" ERROR 1273 (HY000) at line 24: Unknown collation: 'utf8mb4_0900_ai_ci'

Operation failed with exitcode 1 19:01:42 Import of C:\TEMP\all-databases.sql has finished with 1 errors

 
4 years, 1 month ago Daniel Black

To take a guess at the problem (you really should be explicit and never use "not working" as a description), it might be you are using mysql-8.0 collations (https://dev.mysql.com/doc/refman/8.0/en/charset-collation-names.html) that are not in MariaDB https://mariadb.com/kb/en/setting-character-sets-and-collations/.

If this is the case use mysqldump --no-data {database} and replace all the necessary table in its output such that it can be be loaded in MariaDB-10.3. You can use https://dbfiddle.uk/?rdbms=mariadb_10.3 as a testing ground.

When you are ready to move the data use the mysqldump --no-create-info option to omit the creating of table definitions and hopefully the table changes you have made correspond close enough for your data to be acceptable.

And example of mapping collations https://stackoverflow.com/questions/42385099/1273-unknown-collation-utf8mb4-unicode-520-ci/44122258#44122258

 
4 years ago Max Pol

i think it worked for me now and i have the whole db in mariadb 10_3_24

This worked for me: https://stackoverflow.com/questions/29916610/1273-unknown-collation-utf8mb4-unicode-ci-cpanel

- i made 2 exports in mysql 8 with the workbench - 1x for the structure and 1x for the data - then i made the following replacements in the structure file utf8mb4_0900_ai_ci to utf8_unicode_ci utf8mb4 to utf8 utf8_unicode_520_ci to utf8_unicode_ci - after that i was able to import the structure and afterwards the data in to the mariadb with the workbench

Thanks for your tipps

After that

 
Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.