[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

mysqldump INSERT rows in each line

Posted on 2005-04-16
2
Medium Priority
?
3,176 Views
Last Modified: 2009-12-16

Hello,

I've noticed that since I have installed "MySQL Distrib 4.1.10" mysqldump is now creating more/all inserts in one "INSERT ROW" like:
INSERT INTO `table` VALUES (1,'something'),(2,'anything'),(3,'everything');

The earlier version did it in this way:
INSERT INTO `table` VALUES (1,'something');
INSERT INTO `table` VALUES (2,'anything');
INSERT INTO `table` VALUES (3,'everything');

I prefer the second one, because it's more helpfull if I want to edit anything and for many reasons, too.
Is there a way to tell "mysqldump" to create for each insert a new row?

Thanx
BlueJ

0
Comment
Question by:BlueJ
2 Comments
 
LVL 17

Accepted Solution

by:
akshah123 earned 120 total points
ID: 13797831
In 4.0 all variables was FALSE by default and you could for example use the short -e to start using extended inserts.
In 4.1 this and several other mysql specific variables are set to TRUE by default.

If you want to set them to FALSE again you have two choices:
Either create a default file where you turn of the variables that you choose.

Or you can use the long variable name combined with a value like this:
mysqldump --extended-insert=FALSE

This works for all variables that controls the behaviour of mysqldump which can be found at the end of a "mysqldump --help" listing.

for more info check out:

http://dev.mysql.com/doc/mysql/en/mysqldump.html
0
 

Author Comment

by:BlueJ
ID: 13802040

Thanks akshah123,

perfect help!

BlueJ
0

Featured Post

NEW Veeam Backup for Microsoft Office 365 1.5

With Office 365, it’s your data and your responsibility to protect it. NEW Veeam Backup for Microsoft Office 365 eliminates the risk of losing access to your Office 365 data.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Does the idea of dealing with bits scare or confuse you? Does it seem like a waste of time in an age where we all have terabytes of storage? If so, you're missing out on one of the core tools in every professional programmer's toolbox. Learn how to …
Creating and Managing Databases with phpMyAdmin in cPanel.
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Suggested Courses
Course of the Month19 days, 14 hours left to enroll

872 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question