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 > mysql dump
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
mysql dump

Réponse
 
LinkBack Outils de la discussion
Vieux 11/12/2007, 20h04   #1
Naufal Sheikh
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut mysql dump

Hello every one,

I have two questions actually. If there is a database server with couple of
databases, and we only want to take the dump of few of them, can we specify
a list of those on either mysqldump or mysql prompt ( for any other purpose
).or we have to run the mysqldump command seperately for every database.

e.g. mysqldump --database1 > database1.sql
mysqldump --database2 > database2.sql

or mysqldump --database1 --database2 > database.sql

Second, when I am importing a dump file into another server, if that server
already has thate database, it gives me an error of saying that the
table/column already exists. Is there any switch to over ride that.



I'll appreciate if some can please me on above!

Thanks
Naufal

  Réponse avec citation
Vieux 11/12/2007, 20h31   #2
Michael Dykman
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: mysql dump

from the mydump screen:

$ mysqldump --
mysqldump Ver 10.10 Distrib 5.0.22, for redhat-linux-gnu (x86_64)

....

with all databases selected.
--add-drop-database Add a 'DROP DATABASE' before each create.
--add-drop-table Add a 'drop table' before each create.

....

--create-options Include all MySQL specific create options.
-B, --databases To dump several databases. Note the difference in usage;
In this case no tables are given. All name arguments are
regarded as databasenames. 'USE db_name;' will be
included in the output.

- michael

On Dec 11, 2007 2:04 PM, Naufal Sheikh <naufalzamir@gmail.com> wrote:
> Hello every one,
>
> I have two questions actually. If there is a database server with couple of
> databases, and we only want to take the dump of few of them, can we specify
> a list of those on either mysqldump or mysql prompt ( for any other purpose
> ).or we have to run the mysqldump command seperately for every database.
>
> e.g. mysqldump --database1 > database1.sql
> mysqldump --database2 > database2.sql
>
> or mysqldump --database1 --database2 > database.sql
>
> Second, when I am importing a dump file into another server, if that server
> already has thate database, it gives me an error of saying that the
> table/column already exists. Is there any switch to over ride that.
>
>
>
> I'll appreciate if some can please me on above!
>
> Thanks
> Naufal
>




--
- michael dykman
- mdykman@gmail.com

- All models are wrong. Some models are useful.
  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 05h42.


Édité par : vBulletin® version 3.7.4
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,07835 seconds with 10 queries