This guide explains how to import a MySQL/MariaDB database.
Follow the steps:
- To import MySQL/MariaDB database file, first you will have to add an empty database. Log in to MySQL/MariaDB database using the following command-
mysql -u root –p - Enter the root password and create database-
CREATE DATABASE [database name]; - Now, to quit; log out of the client area using the below command-
quit; - You can now import the database file by executing the command given below-
mysql -u [username] -p [new database name] < [.sql dump file name]
Hope you liked this KB. If you want to know more on web hosting, visit our KB section regularly. Also, never hesitate to get in touch with our support specialists.