cabriofahrer
Well-Known Member
Ich will eine Datenbank (Name: ejemplo) per mysqldump von einem Rechner auf den anderen transferieren, beide Rechner haben FreeBSD mit mysql. Das von mir verwendete Kommando müsste eigentlich klappen (Ich nehme auch an, dass ich laut Ausgabe nach beiden Passwörtern gefragt werde, die ich nacheinander mit einem Abstand eigeben muss?)
Aber auch, wenn ich die Passwörter direkt in den Befehl eingebe, klappt es nicht:
Code:
$ mysqldump -u root -p ejemplo | mysql --host=192.168.1.55 -u root -p -C ejemplo
Enter password: Enter password:
ERROR 2003 (HY000): Can't connect to MySQL server on '192.168.1.55' (61)
mysqldump: Got error: 1045: Access denied for user 'root'@'localhost' (using password: YES) when trying to connect
$ ping 192.168.1.55
PING 192.168.1.55 (192.168.1.55): 56 data bytes
64 bytes from 192.168.1.55: icmp_seq=0 ttl=64 time=20.777 ms
64 bytes from 192.168.1.55: icmp_seq=1 ttl=64 time=1.582 ms
64 bytes from 192.168.1.55: icmp_seq=2 ttl=64 time=1.498 ms
64 bytes from 192.168.1.55: icmp_seq=3 ttl=64 time=46.276 ms
64 bytes from 192.168.1.55: icmp_seq=4 ttl=64 time=1.380 ms
^C
--- 192.168.1.55 ping statistics ---
5 packets transmitted, 5 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 1.380/14.303/46.276/17.646 ms
$
Aber auch, wenn ich die Passwörter direkt in den Befehl eingebe, klappt es nicht:
Code:
$ mysqldump --user=root --password=passwort_local ejemplo | mysql --user=root --password=passwort_host --host=192.168.1.55 -C ejemplo
mysqldump: [Warning] Using a password on the command line interface can be insecure.
mysql: [Warning] Using a password on the command line interface can be insecure.
ERROR 2003 (HY000): Can't connect to MySQL server on '192.168.1.55' (61)
Warning: A partial dump from a server that has GTIDs will by default include the GTIDs of all transactions, even those that changed suppressed parts of the database. If you don't want to restore GTIDs, pass --set-gtid-purged=OFF. To make a complete dump, pass --all-databases --triggers --routines --events.
mysqldump: Got errno 32 on write
$