Uploading Old Data to a New MariaDB Database
The following command-line procedure makes a database in MariaDB (previously MySQL) and populates it with content from a backup file. ========== user@host: $ mariadb -u root -p -h localhost MariaDB > CREATE DATABASE dbname; MariaDB > USE dbname; MariaDB > SELECT database(); -- Checks if the intended database is the one being used. MariaDB > SOURCE dirname/filename; -- Location of the backup file. MariaDB > SHOW tables; -- Verifies if the tables uploaded are from the backup file. MariaDB > GRANT ALL ON dbname.* TO 'username'@'localhost' IDENTIFIED BY 'password'; MariaDB > QUIT; ==========
