Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

host unknown when try to copy db over network

Status
Not open for further replies.

yahoo182

Programmer
Jul 5, 2005
70
CA
Hi there, I am trying to do a db copy over a network using the following command

Code:
mysqldump --opt db_name | mysql -h 'other_hostname' db_name


but whatever I put in the 'other_host' part, whether it is an IP address or a valid domain name, I get unknown Mysql server host error.

Another question I would like to ask is, how would we copy a specific table instead of the whole database using similar command ?

Thanks :)
 
Hi there, it still seem to give me this error even when I dont put quotations around the IP address or the domain name.
It just says i have error in mysql syntax.
here is the following command I tried

mysql> mysqldump --opt jokes | mysql -h 192.168.2.152 jokes;

ERROR 1064: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL s
erver version for the right syntax to use near 'mysqldump --opt jokes | mysql -h 192.168.2.152 jokes
' at line 1
 
mysqldump is not an SQL command, it is a program. It should be called the same way as any other program.
 
You don't type that at the mysql prompt, those are shell commands issued from the shell prompt.
 
Thanks for all the help. I have gotten closer I think. Here is what I have so far at this point.

C:\>mysqldump -ukkohakur -p --opt jokes | mysql -h 192.168.1.152 -ukazu -p jokes;
Enter password: Enter password: ***********
ERROR 1251: Client does not support authentication protocol requested by server; consider upgrading MySQL client

Does anyone have any ideas about how I should upgrade my MySQL client?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top