Fermo restando ciò che ha detto "Zac"...
Il 05/09/12, Bergoglio<settore.tecnico@xxxxxxxxxxxxx> ha scritto:
> Nuovo giro nuova domanda :D
>
> Creo le mie varie tabelle nel mio MySQL sul mio pc > ok
> Voglio costruire le stesse tabelle (senza i miei dati, ovvio) sul pc di
> un mio conoscente > non mi piace faticare > non ho voglia di dare i vari
> comandi a mano > domanda : è possibile creare uno script bash con tutti
> i comandi necessari? E' il sistema giusto od esiste qualcosa di meglio
> per automatizzare?
Sì, si può fare.
Se leggi "man mysqldump" ti si dovrebbero chiarire le idee su come
"scaricare" i dati dal db, e poi "man mysql" per capire come
"ricaricarli" da un'altra parte.
Citando mysqldump:
A common use of mysqldump is for making a backup of an entire database:
shell> mysqldump db_name > backup-file.sql
You can load the dump file back into the server like this:
shell> mysql db_name < backup-file.sql
Inoltre guarda l'opzione --no-data :
· --no-data, -d
Do not write any table row information (that is, do not dump table
contents). This is useful if you want to dump only the CREATE TABLE
statement for the table (for example, to create an empty copy of the
table by loading the dump file).
|