如何用数据导出MySQL模式? [英] How to export MySQL schema with data?
问题描述
在MySQL查询浏览器中,我有一个包含多个表的完整架构,其中包含数据.现在,我要将包含所有表/数据的完整数据库发送给我的同事.如何将其发送给我的同事,以便他可以将完整的架构放在他的MySQL查询浏览器中?
I have a complete schema with many tables with data in them in MySQL query browser. Now I want to send this complete database with all the tables/data to my colleague. How can I send this to my colleague, so that he can then place this complete schema in his MySQL Query browser?
谢谢.
推荐答案
我不确定您在哪里工作,可以将其导出到文件中,然后发送给您的朋友. (root是我的本地主机名)
I`m not sure where are you working, you could export it to file, and send it to your friend. (root is my localhost username)
mysqldump -u root -p --databases DB_NAME >databasename.sql
PS:mysqldump实际上是/MySQL \ MySQL Server 5.6 \ bin中存在的可执行文件
PS: mysqldump is actually a executable file present in your /MySQL\MySQL Server 5.6\bin
例如[在Windows上]
for example [ on windows ]
C:\Program Files (x86)\MySQL\MySQL Server 5.6\bin\mysqldump.exe
或[在linux上]
or [ on linux ]
/usr/bin/mysqldump
这篇关于如何用数据导出MySQL模式?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!