Skip to content

Instantly share code, notes, and snippets.

@lanrion
Last active August 29, 2015 14:03
Show Gist options
  • Save lanrion/9641a1281197af1afce6 to your computer and use it in GitHub Desktop.
Save lanrion/9641a1281197af1afce6 to your computer and use it in GitHub Desktop.
mysqldump 导出导入数据库
导出:
mysqldump -uroot db_name > tmp/db_name
导入:
进入mysql数据库控制台,
如mysql -u root -p
mysql>use 数据库;
然后使用source命令,后面参数为脚本文件(如这里用到的.sql)
mysql>source SQL的文件目录;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment