Michael Williams wrote:
Hi all,

I'm trying to use "mysqldump" over SSH. I'm pretty familiar with port forwarding in and of itself, so I doubt that's the issue. No matter what port I forward (or to where for that matter), "mysqldump" still connects to the local MySQL server and dumps local data. It's as if it completely disregards my PORT option. Any ideas?

My commands are as follows:

    %ssh -L 8080:localhost:3306   remote_server_ip

%mysqldump -u user_name --port=8080 --compact --quick --all- databases > dumpfile

Depending on the "user_name" it either fails or dumps my local data. It doesn't even use --port

Regards,
Michael

Assuming you're on some version of Unix, it is completely disregarding your port option, because you are not specifying a host. The default is localhost, which means to connect via the unix socket. Port is meaningless with unix socket connections. To use your ssh tunnel, you have to make a tcp connection, which means you need to specify a host IP:

  mysqldump -u user_name -h 127.0.0.1 -P 8080 --compact --quick \
    --all-databases > dumpfile

Michael

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to