How to import MySQL data into MariaDB?
To import MySQL data into MariaDB, you can use the following method: 1. Backup the data of the MySQL database using the mysqldump command.
mysqldump -u username -p database_name > backup.sql
In MariaDB, create a corresponding database with the MySQL username as `username`, the database name as `database_name`, and the backup file named `backup.sql`.
mysql -u username -p -e "CREATE DATABASE new_database"
3. Import the backup file into the MariaDB database, where `username` is the MariaDB username and `new_database` is the name of the database being created.
mysql -u username -p new_database < backup.sql
In the command, replace `username` with MariaDB username, `new_database` with the name of the database you want to import data into, and `backup.sql` with the name of the previously backed up file. Make sure to substitute the corresponding username, database name, and file name when executing the command.