简体   繁体   English

在MySQL Workbench中导出数据库

[英]Exporting database in MySQL Workbench

I want to export my database in MySQL Workbench, but I only want the INSERT statements to appear in the text files. 我想在MySQL Workbench中导出数据库,但是我只希望INSERT语句出现在文本文件中。 However I get a bunch of stuff I don't know what is for. 但是我有很多东西,我不知道是干什么的。 How can I remove things like this: 我该如何删除类似的内容:

/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;

When you export database, these commented line define the encoding of your database, table and column and other attributes of your database. 导出数据库时,这些带注释的行定义了数据库的编码,表和列以及数据库的其他属性。

and If you after export, then import your database again through phpmyadmin or MySQL Work Bench or by SQLYog. 如果导出后再通过phpmyadmin或MySQL Work Bench或SQLYog再次导入数据库。 It will ignore all these commented values. 它将忽略所有这些注释值。 But if you want to remove then you need to work hard and easily removed through notepad plus plus. 但是,如果要删除,则需要努力工作,并通过记事本plus plus轻松删除。

In Notepad Plus Plus, you press Ctrl+F, click on replace. 在Notepad Plus Plus中,按Ctrl + F,然后单击“替换”。 Select those values which are repeated throughout in the file and in place of replace just one click of white space. 选择在整个文件中重复的那些值,并代替一键替换空白。 and then you will clear your file manually .... 然后您将手动清除文件....

Thanks. 谢谢。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM