|
|
|
![]() |
|
Strumenti |
![]() |
#1 |
Senior Member
Iscritto dal: Aug 2004
Città: Palermo
Messaggi: 1079
|
Estrarre schema di un database mysql
Salve a tutti ho un database mysql del quale vorrei estrarre lo schema per replicarlo su un altro computer, ho provato, seguendo vari consigli e leggendo un pò il manuale, ad eseguire i seguenti comandi che qua sotto mi scrivo ma nessuno di questi funziona mi viene sempre detto che c'è un errore di sintassi. Ho provato a prendere lo schema loggandomi come root o come l'utente che accede normalmente al database ma non c'è verso mi viene dato sempre lo stesso errore di sintassi, come devo fare?
Qui vi allego tutti i comandi che ho provato. mysql> mysqldump -uroot -ppalermo -h192.168.0.16 --no-data--add-drop-table tesi > struttura.sql; mysql> mysqldump -u root -p palermo -h 192.168.0.16 --no-data--add-drop-table te si > struttura.sql; mysql> mysqldump -u tesi -p juventus -h localhost tesi > struttura.sql; mysql> mysqldump -u tesi -p juventus -h 192.168.0.16 tesi > struttura.sql; mysql> mysqldump -utesi -pjuventus -h192.168.0.16 tesi > struttura.sql; mysql> mysqldump -utesi -pjuventus -h192.168.0.16 --no-data --add-drop-table tes i > struttura.sql; mysql> mysqldump -u tesi -p juventus -h 192.168.0.16 --no-data--add-drop-table t esi > struttura.sql; Dando tutti questi comandi ottengo sempre lo stesso errore: ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'mysql dump -u tesi -p juventus -h 192.168.0.16 -d tesi>struttura.sql' at line 1 192.168.0.16 è l'indirizzo di localhost (su cui è installato mysql server)nella rete lan. Come devo fare per prendere lo schema del database? Grazie, ciao ciao. |
![]() |
![]() |
![]() |
#2 |
Junior Member
Iscritto dal: Sep 2005
Messaggi: 19
|
Vedendo i comandi e il relativo errore che ri genera, mi sembra di capire che hai lanciato il comando "mysqldump" da MySQL, o sbaglio? Il comando va lanciato da shell.
Ciao. |
![]() |
![]() |
![]() |
#3 |
Senior Member
Iscritto dal: Aug 2004
Città: Palermo
Messaggi: 1079
|
Ti ringrazio facevo esattamente quell'errore, ho provato da prompt e ci sono riuscito grazie.
|
![]() |
![]() |
![]() |
Strumenti | |
|
|
Tutti gli orari sono GMT +1. Ora sono le: 10:19.