View previous topic :: View next topic |
Author |
Message |
s1sd3 n00b


Joined: 08 Nov 2004 Posts: 11
|
Posted: Wed Dec 29, 2004 9:15 pm Post subject: importare database [risolto] |
|
|
casa usate per importare in locale un databese (mysql) attualmente in un server remoto
Last edited by s1sd3 on Wed Dec 29, 2004 11:40 pm; edited 1 time in total |
|
Back to top |
|
 |
DaVe&OpenMOsix Apprentice


Joined: 30 Dec 2003 Posts: 213
|
Posted: Wed Dec 29, 2004 9:48 pm Post subject: |
|
|
l'ho scritto io...
http://gentoo-wiki.com/HOWTO_Backup_MySQL
dovrebbe funzionare...
ti "dumpi" il database, te lo copi in locale, e te ne crei uno nuovo
ciao
DV _________________ -- Siccome sono un informatico ho votato PCI convinto di aumentare gli slot di espansione della società --
-^v^v^v^v^v^v^v^v^v^-
DaVe the WaVe
http://dave.ccni.it
http://www.davethewave.it
-^v^v^v^v^v^v^v^v^v^- |
|
Back to top |
|
 |
lopio Veteran


Joined: 22 Dec 2003 Posts: 1161 Location: savona, Italy
|
Posted: Wed Dec 29, 2004 9:49 pm Post subject: Re: importare database |
|
|
s1sd3 wrote: | casa usate per importare in locale un databese (mysql) attualmente in un server remoto |
intendi qualcosa come mysqldump o parli del meccanismo di trasporto? |
|
Back to top |
|
 |
s1sd3 n00b


Joined: 08 Nov 2004 Posts: 11
|
Posted: Wed Dec 29, 2004 9:56 pm Post subject: |
|
|
... dovo fare sul mio computer una copia di un database che si trova su un determinato server... io conosco l'host, il nome del database, l'user e la password... come posso fare (aiuto pls) |
|
Back to top |
|
 |
DaVe&OpenMOsix Apprentice


Joined: 30 Dec 2003 Posts: 213
|
Posted: Wed Dec 29, 2004 10:03 pm Post subject: |
|
|
come ho scritto sopra dovrebbe funzionare!!!
una volta che hai dumpato il database puoi importartelo in locale con scp, ftp o quello che ti pare.
nel link sopra c'è tutto quello che ti serve
ciao
DV _________________ -- Siccome sono un informatico ho votato PCI convinto di aumentare gli slot di espansione della società --
-^v^v^v^v^v^v^v^v^v^-
DaVe the WaVe
http://dave.ccni.it
http://www.davethewave.it
-^v^v^v^v^v^v^v^v^v^- |
|
Back to top |
|
 |
s1sd3 n00b


Joined: 08 Nov 2004 Posts: 11
|
Posted: Wed Dec 29, 2004 10:15 pm Post subject: |
|
|
quindi con un comando come :
mysqldump -ac --add-drop-table --host="sql.nomehost.com" --user="nome" --password="pass" nomedatabase > nomedatabase.mysql
e poi con un ftp me lo porto in locale (scusate ma non vorrei fare danni al databese in rete) |
|
Back to top |
|
 |
DaVe&OpenMOsix Apprentice


Joined: 30 Dec 2003 Posts: 213
|
Posted: Wed Dec 29, 2004 10:16 pm Post subject: |
|
|
yess!
e poi per riavere i dati nel database locale
Code: | mysql -u nomeutente -p |
si entra nella shell di mysql e
Code: | mysql> source filedump; |
fine
ciao
DV _________________ -- Siccome sono un informatico ho votato PCI convinto di aumentare gli slot di espansione della società --
-^v^v^v^v^v^v^v^v^v^-
DaVe the WaVe
http://dave.ccni.it
http://www.davethewave.it
-^v^v^v^v^v^v^v^v^v^- |
|
Back to top |
|
 |
s1sd3 n00b


Joined: 08 Nov 2004 Posts: 11
|
Posted: Wed Dec 29, 2004 11:09 pm Post subject: |
|
|
ho dato il seguente comando
Code: | mysqldump -h sql.host.com -u nome -ppass database > database.mysql |
e nella mia home si è creato il file database.mysql, quindi senza bisogno di usare l'ftp
grazie a tutti  |
|
Back to top |
|
 |
DaVe&OpenMOsix Apprentice


Joined: 30 Dec 2003 Posts: 213
|
Posted: Wed Dec 29, 2004 11:13 pm Post subject: |
|
|
s1sd3 wrote: | ho dato il seguente comando
Code: | mysqldump -h sql.host.com -u nome -ppass database > database.mysql |
e nella mia home si è creato il file database.mysql, quindi senza bisogno di usare l'ftp
grazie a tutti  |
ciò significa che il server ti ha dato l'accesso al database anche da remoto, e questo non è detto che si possa sempre fare!
cmq sono contento che il mio consiglio ti abbia servito!
metti [risolto] al titolo se tutto è ok!
ciao
DV _________________ -- Siccome sono un informatico ho votato PCI convinto di aumentare gli slot di espansione della società --
-^v^v^v^v^v^v^v^v^v^-
DaVe the WaVe
http://dave.ccni.it
http://www.davethewave.it
-^v^v^v^v^v^v^v^v^v^- |
|
Back to top |
|
 |
|