MySQL import data

1, mysql command to import
using the mysql command to import syntax is:

mysql -u username -p password <database data (runoob.sql) to import
Example:

# Mysql -uroot -p123456 <runoob.sql
above command will backup the entire database runoob.sql introduced.

2, source command to import the
source command to import the database must be logged into a terminal number of libraries:

mysql> create database abc; # create a database
mysql> use abc; # use the database has been created
mysql> set names utf8; # set the encoding
mysql> source /home/abc/abc.sql # import the backup database

Guess you like

Origin www.cnblogs.com/faberbeta/p/mysql001.html
Recommended