[英]How to export MySQL schema with data?
I have a complete schema with many tables with data in them in MySQL query browser. 我有一个完整的模式,在MySQL查询浏览器中有许多包含数据的表。 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?
如何将此信息发送给我的同事,以便他可以将这个完整的模式放在他的MySQL查询浏览器中?
Thanks. 谢谢。
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)
(root是我的localhost用户名)
mysqldump -u root -p --databases DB_NAME >databasename.sql
PS: mysqldump is actually a executable file present in your /MySQL\\MySQL Server 5.6\\bin PS:mysqldump实际上是/ MySQL \\ MySQL Server 5.6 \\ bin中存在的可执行文件
for example [ on windows ] 例如[在Windows上]
C:\Program Files (x86)\MySQL\MySQL Server 5.6\bin\mysqldump.exe
or [ on linux ] 或者[在linux上]
/usr/bin/mysqldump
You can use the mysqldump command. 您可以使用mysqldump命令。
If you are using MySQL Workbench open the server administration tab and you can do an Export To Disk from there using a GUI interface. 如果您使用的是MySQL Workbench,请打开服务器管理选项卡,然后使用GUI界面从那里执行“ 导出到磁盘” 。
There are options to dump to a single file or directory, and whether to include data or not. 可以选择转储到单个文件或目录,以及是否包含数据。
you could export the database as a *.sql file using phpMyAdmin. 您可以使用phpMyAdmin将数据库导出为* .sql文件。
or write a C++/C#/Java etc Programm that generates such statements too. 或编写一个C ++ / C#/ Java等程序,也可以生成这样的语句。
http://fragments.turtlemeat.com/mysql-database-backup-restore-phpmyadmin.php http://fragments.turtlemeat.com/mysql-database-backup-restore-phpmyadmin.php
I am no way affiliated with turtlemeat 我不喜欢与龟肉有关
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.