怎么备份sql server2008数据库的内容到mysql5.6
发布网友
发布时间:2022-04-12 16:10
我来回答
共1个回答
热心网友
时间:2022-04-12 17:40
进入MySQL目录下的bin文件夹
mysqlmp -u 用户名 -p 数据库名 > 导出的文件名
例如:
C:\Program Files\MySQL\MySQL Server 5.5\bin>mysqlmp -u root -p Test > test.sql
Enter password: ********
C:\Program Files\MySQL\MySQL Server 5.5\bin>dir *.sql
驱动器 C 中的卷没有标签。
卷的序列号是 406A-C32E
C:\Program Files\MySQL\MySQL Server 5.5\bin 的目录
2013-01-29 16:34 39,574 test.sql
1 个文件 39,574 字节
0 个目录 5,498,294,272 可用字节
导入
C:\Program Files\MySQL\MySQL Server 5.5\bin>mysql -u root -p
Enter password: ********
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 17
Server version: 5.5.29 MySQL Community Server (GPL)
Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> create database test2;
Query OK, 1 row affected (0.04 sec)
mysql> use test2
Database changed
mysql> source test.sql