2

I want to export my database in MySQL Workbench, but I only want the INSERT statements to appear in the text files. 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 */;
LuckyLuke
  • 47,771
  • 85
  • 270
  • 434
  • Open in a text editor and delete what you don't want ;) – bretterer Oct 22 '12 at 19:48
  • However I want to use cat * > all.sql, and I do not know shell programming which probably would have solved it :) I could only have included the lines matching INSERT – LuckyLuke Oct 22 '12 at 19:49

1 Answers1

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. 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.

In Notepad Plus Plus, you press Ctrl+F, click on replace. 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.