navicate for MySQL export SQL script and then process through notepad++ regular expression

Source: Internet
Author: User

navicate for MySQL export SQL script and then process through notepad++


Use target: Extract all drop table SQL scripts


My operation steps:

Step 1, select a database in navicate for MySQL, then right-click Dump SQL File and choose Save Path,

will be saved as a SQL script file, including insert scripts for table and table.

Step 2, open the SQL script file and copy to notepad++

Step 3, in notepad++, find mode select "Regular expression"

Note that the following regular expression strings are "find target", "replaced with" not filled, which is empty, "replace all" in the point "replace",

>>>>>>>>>>>>>>>>>>

^insert into. *;$
^create.*$
^  `.*`.*$
^ primary.*$
^\) engine=myisam.*$
^--.*$
\r\n\r\n

<<<<<<<<<<<<<<<<<<<

Step 4: Continue with the following 2 substitution actions, find pattern or regular expression,

Fill in the "Find target" and "Replace with" respectively, point all replace

>>>>>>>>>>>>>>>>>>>

;D ROP
; \r\ndrop


SET
\r\n\r\nset

<<<<<<<<<<<<<<<<<<<


Step 5: If it doesn't go wrong, you can theoretically get the same results as me.


End

navicate for MySQL export SQL script and then process through notepad++ regular expression

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.