Copying a mysql database from localhost to remote server using mysqldump.exe

Posted by Ankur on Stack Overflow See other posts from Stack Overflow or by Ankur
Published on 2010-05-11T02:11:28Z Indexed on 2010/05/11 2:24 UTC
Read the original article Hit count: 236

Filed under:
|
|

I want to copy a mysql database from my local computer to a remote server.

I am trying to use the mysql dump command. All the examples on the internet suggest doing something like

The initial mysql> is just the prompt I get after logging in.

mysql> mysqldump -u user -p pass myDBName | NewDBName.out;

But when I do this I get You have an error in your SQL syntax; check the manual that corresponds ... to use near 'mysqldump -u user -p pass myDBName | NewDBName.out'

Since I have already logged in do I need to use -u and -p? Not doing so gives me the same error. Can you see what is wrong?

© Stack Overflow or respective owner

Related posts about mysql

Related posts about database-backups