1

The mysqldump tool inserts this MySQL specific commands into the dump (/.../). I know what they do. I don't want them anyway in my dumps. Is there finally a parameter that can be specified to dump DB contents without this lines? And without altering the file afterwards (or by pipelining) with a tool or whatever.

I tried almost all related parameters (yes, including --compact) in 5.5.19 but the lines are still in the output. If the MySQL guys didn't added a documented parameter to skip this lines, ok. But I couldn't find a definite answer until now.

StanE
  • 2,704
  • 29
  • 38
  • possible duplicate of [How can I get rid of these comments in a MySQL dump?](http://stackoverflow.com/questions/1916392/how-can-i-get-rid-of-these-comments-in-a-mysql-dump) – Alex May 14 '15 at 19:38
  • No, it isn't. I know the other question and it was not helpful. In my question I made it clear that I didn't found a solution (in the other question nobody gave a working solution) and more importantly that I want to know if it is possible to skip this lines with the onboard methods of the mysqldump tool. I don't want to use additional tools, like grep, and I don't need an explanation of what this lines are for - I know what they do. – StanE May 14 '15 at 19:53
  • it is 100% duplicate so just read here http://stackoverflow.com/a/1916451/4421474 and here http://stackoverflow.com/a/6914744/4421474 and http://stackoverflow.com/a/1916407/4421474 and all the rest there – Alex May 14 '15 at 20:00
  • Alex, I explained my question 2 times (!) now but you didn't read what I asked. None of these answers my question. Now I say it a third time: I know what this lines are for - I don't need an explanation. And I didn't said anything about "comments". None of your reference links answers my question. I want to know if mysqldump can dump the data without these lines. If you still think that my question has been answered, then show me exactly the post that answers my question. None of your 3 links does it. One of them explains what this lines mean and the other two talk about SQL comments. – StanE May 14 '15 at 21:17

1 Answers1

1

Well, short answer is: No, you can't. I am sorry.

Obviously you can change the fprintf's in this document and recompile: https://github.com/MariaDB/server/blob/10.1/client/mysqldump.c

Another option is the --xml . I will remove the comments you dislike, but then the mysqldump is not even dumping sql anymore.