Quantcast
Viewing latest article 1
Browse Latest Browse All 60

Importing Database in MySQL from a sql dump file

First create a dump or .sql file of the database you want to take back up of. Then transfer it to the computer on which you want to import the data (if the file is not on that computer). Now follow these steps:

Open terminal and then do the following:

1.Login to MySQL as root:

mysql -u root -p;


2.Then create a database, say dbname using:

create database dbname;

3.Use the database created:

use dbname;

4.Import the MySQL dump file:

source pathofsqlfile.sql

Here pathofsqlfile.sql is the absolute path of the sql dump file (you can also give relative path if the sql dump file is in mysql directory itself)


Filed under: My Sql Tagged: Import database, MySQL, sql dump Image may be NSFW.
Clik here to view.
Image may be NSFW.
Clik here to view.
Image may be NSFW.
Clik here to view.
Image may be NSFW.
Clik here to view.
Image may be NSFW.
Clik here to view.
Image may be NSFW.
Clik here to view.
Image may be NSFW.
Clik here to view.
Image may be NSFW.
Clik here to view.

Viewing latest article 1
Browse Latest Browse All 60

Trending Articles