Import a MySQL/MariaDB Database

In order to import a MySQL/MariaDB database file, you will first need to create an empty database. Log in to the MySQL/MariaDB client with the command:

mysql -u root -p

Enter the MySQL/MariaDB root user's password, then create the database:

CREATE DATABASE [database name];

For example, to create a database named my_db the command is:

CREATE DATABASE my_new_db;

Once this is done, log out of the client:

quit;

SSL certificates from IONOS

Protect your domain and gain visitors' trust with an SSL-encrypted website!

Easy to activate
Proven safety
24/7 assistance

You can now import the database file with the command:

mysql -u [username] -p [new database name] < [.sql dump file name]

For example, to import a .sql dump file named my_db-10-01-2016.sql into the my_new_db database, the command is:

mysql -u root -p my_new_db < my_db-10-01-2016.sql

$1 Domain Names

Register great TLDs for less than $1 for the first year.

Why wait? Grab your favorite domain name today!

Matching email
SSL certificate
24/7/365 support

Wait! We’ve got something for you!
Have a look at our great prices for different domain extensions.


Enter the web address of your choice in the search bar to check its availability.
.club
$1/1st year
then $15/year
.com
$1/1st year
then $15/year
.info
$1.60/1st year
then $20/year
.org
$1/1st year
then $25/year