mysql 导入导出数据库

mysql 导入导出数据库


1.导出数据

// 导出test 数据库
mysqldump -u root -p test > test.sql

// 导出test数据库中user表
mysqldump -u root -p test user > test_user.sql

2.导入数据
方法1:
mysql -u root -p
mysql>use test
mysql>source test.sql

方法2:
mysql -u root -p test < test.sql


posted @ 2013-08-02 01:15  傲雪星枫  阅读(124)  评论(0编辑  收藏  举报