WEB开发网
开发学院数据库MySQL MySQL导出导入命令的用例 阅读

MySQL导出导入命令的用例

 2008-10-20 11:11:35 来源:WEB开发网   
核心提示: 4.导入数据库格式:常用source 命令进入mysql数据库控制台:C:MySQLMySQL Server 5.0bin>mysql -u root -pEnter password:Welcome to the MySQL monitor. Commands end with ;

4.导入数据库

格式:常用source 命令

进入mysql数据库控制台:

C:MySQLMySQL Server 5.0bin>mysql -u root -p

Enter password:

Welcome to the MySQL monitor.  Commands end with ; or g.

Your MySQL connection id is 10 to server version: 5.0.7-beta-nt

Type 'help;' or 'h' for help. Type 'c' to clear the buffer.

mysql> use testdb;

Database changed

mysql> source testdb.sql;

Query OK, 0 rows affected (0.05 sec)

Query OK, 0 rows affected (0.00 sec)

Query OK, 0 rows affected (0.00 sec)

Query OK, 0 rows affected (0.00 sec)

Query OK, 0 rows affected (0.00 sec)

Query OK, 0 rows affected (0.00 sec)

Query OK, 0 rows affected (0.00 sec)

Query OK, 0 rows affected (0.00 sec)

Query OK, 0 rows affected (0.13 sec)

Query OK, 0 rows affected (0.10 sec)

Query OK, 0 rows affected (0.01 sec)

Query OK, 0 rows affected (0.00 sec)

Query OK, 2 rows affected (0.04 sec)

Records: 2  Duplicates: 0  Warnings: 0

Query OK, 0 rows affected (0.00 sec)

Query OK, 0 rows affected (0.00 sec)

Query OK, 0 rows affected (0.03 sec)

Query OK, 0 rows affected (0.09 sec)

Query OK, 0 rows affected (0.00 sec)

Query OK, 0 rows affected (0.01 sec)

Query OK, 2 rows affected (0.03 sec)

Records: 2  Duplicates: 0  Warnings: 0

Query OK, 0 rows affected (0.00 sec)

Query OK, 0 rows affected (0.00 sec)

Query OK, 0 rows affected (0.01 sec)

Query OK, 0 rows affected (0.00 sec)

Query OK, 0 rows affected (0.00 sec)

Query OK, 0 rows affected (0.00 sec)

Query OK, 0 rows affected (0.00 sec)

Query OK, 0 rows affected (0.00 sec)

Query OK, 0 rows affected (0.00 sec)

mysql>

其中testdb.sql放在C:MySQLMySQL Server 5.0bin目录下,如果不在这个目录下则要指定路径

上一页  1 2 3 4 5 

Tags:MySQL 导出 导入

编辑录入:爽爽 [复制链接] [打 印]
赞助商链接