In this document, we will show you how to dump a database with mysqldump and restore it.
How to dump the database
mysqldump -u [username] -p [database] > this_database.sql
Restore procedure
If the Database exist, drop the database first.
mysql -u root -p MariaDB> DROP DATABSE this_database; exit
You need now to create the empty database.
mysql -u root -p MariaDB> CREATE DATABASE this_database; exit
You can now import the dump in your database server
mysql -u [username] -p [database] < this_database.sql