Need help with proper migration from mysql to mariadb

Understudy

Active Member

Reaction score: 5
Messages: 131

So I have to physical machines. One is an older server with FBSD 9.3 and Mysql 5.5.46 the other is a FBSD 12.2 and mariadb 10.5.10

I want to I believe do a mysqldump (for all the databases) and then copy the dump over to the new machine. Is there a proper procedure set of steps for this?
Google really doesn't discuss this properly.
 
OP
Understudy

Understudy

Active Member

Reaction score: 5
Messages: 131

Thinking this is the command:

# mysqldump -u root -p --all-databases > all_databases.sql
 
OP
Understudy

Understudy

Active Member

Reaction score: 5
Messages: 131

Possible import command:
mysql -u root -p < all_databases.sql
 
OP
Understudy

Understudy

Active Member

Reaction score: 5
Messages: 131

Darn it. I have an error.
ERROR 1050 (42S01) at line 1993: Table 'user' already exists

this is what I get when I try to do the import.
 

Phishfry

Beastie's Twin

Reaction score: 2,568
Messages: 5,449

I am in no means an expert but I think you want to setup a new db in maria and import into that.
If you need to merge into your existing mariaDB then that becomes more involved.
 

jmos

Active Member

Reaction score: 173
Messages: 237


So today there is no drop-in replacement for MySQL 5.5. I recommend to:
  • set up the databases manually
  • set up the users and rights manually
  • doing dumps and imports separated for each databases
  • transfer only your databases (not the internal)
The hard way is to open one server to another, use a script language which connects to both databases, and read one record after another to build up separated, valid insert statements.

…and maybe you want to use this to switch over to a charset like utf8mb4_unicode_ci?
 

Alain De Vos

Daemon

Reaction score: 542
Messages: 1,882

In order to not have conflict you could install mariadb in one jail, mysql in an other jail, run the servers on different ports and then copy over tables ?
 
Top