PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Autres forums > Forum Programmation & Conception > mysql.general > mysqldump with single rows per dataset
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
mysqldump with single rows per dataset

Réponse
 
LinkBack Outils de la discussion
Vieux 03/09/2007, 15h10   #1
Marten Lehmann
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut mysqldump with single rows per dataset

Hello,

I couldn't find an option within mysql 5.0.x to get a dump of all rows
of a table with one line per row/record. I always get insert statements
with all rows at once. Has that option been removed since 4.1.x?

Regards
Marten
  Réponse avec citation
Vieux 03/09/2007, 17h53   #2
Michael Trausch
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: mysqldump with single rows per dataset

Marten Lehmann, on 09/03/2007 10:10 AM said:
> Hello,
>
> I couldn't find an option within mysql 5.0.x to get a dump of all rows
> of a table with one line per row/record. I always get insert statements
> with all rows at once. Has that option been removed since 4.1.x?
>


Try --extended-insert=0 which should disable that. From MySQL 5.0.48
mysqldump man page:


To get a list of the options your version of mysqldump supports,
execute mysqldump --. You can disable options with e.g.
--extended-insert=0.

....

· --extended-insert, -e

Use multiple-row INSERT syntax that include several VALUES
lists. This results in a smaller dump file and speeds up
inserts when the file is reloaded.

--
Michael B. Trausch http://www.trausch.us/
Pidgin 2.1.1 and plugins for Ubuntu Feisty!
(And Thunderbird 2.0.0.6, too!) http://www.trausch.us/pidgin
  Réponse avec citation
Vieux 03/09/2007, 20h13   #3
Dan Nelson
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: mysqldump with single rows per dataset

In the last episode (Sep 03), Marten Lehmann said:
> I couldn't find an option within mysql 5.0.x to get a dump of all
> rows of a table with one line per row/record. I always get insert
> statements with all rows at once. Has that option been removed since
> 4.1.x?


Add --skip-extended-insert to your mysqldump commandline.

o --extended-insert, -e

Use multiple-row INSERT syntax that include several VALUES lists.
This results in a smaller dump file and speeds up inserts when the
file is reloaded.

o --opt

This option is shorthand; it is the same as specifying
--add-drop-table --add-locks --create-options --disable-keys
--extended-insert --lock-tables --quick --set-charset. It should
give you a fast dump operation and produce a dump file that can be
reloaded into a MySQL server quickly.

The --opt option is enabled by default. Use --skip-opt to disable
it. See the discussion at the beginning of this section for
information about selectively enabling or disabling certain of the
options affected by --opt.

--
Dan Nelson
dnelson@allantgroup.com
  Réponse avec citation
Vieux 04/09/2007, 13h28   #4
Marten Lehmann
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: mysqldump with single rows per dataset

Hello,

thanks. I just wonder why this isn't actually documented in the --
output of mysqldump.

Regards
Marten
  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 10h31.


Édité par : vBulletin® version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,10199 seconds with 12 queries