# Need help with proper migration from mysql to mariadb



## Understudy (Jun 5, 2021)

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.


----------



## Understudy (Jun 5, 2021)

Thinking this is the command:

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


----------



## Understudy (Jun 5, 2021)

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


----------



## Understudy (Jun 5, 2021)

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 (Jun 5, 2021)

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 (Jun 5, 2021)

MariaDB versus MySQL - Compatibility
					

Compatibility and differences with MariaDB related to high availability, security and scalability. Learn about the comparisons of MariaDB versus MySQL.




					mariadb.com
				




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 (Jun 5, 2021)

__





						How to Migrate MySQL to MariaDB on Linux?
					

How to Migrate MySQL to MariaDB on Linux? - This article will help you to migrate the database from MySQL to MariaDB as the binary compatibility of MySQL-to-Mar ...




					www.tutorialspoint.com
				



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 ?


----------

