Using mysql command line with SSH

I have connected to my server via SSH to import a mysql table via:

mysql -u UUU -pPPPPPP databasename < file.sql

and I get the error message.

“Can’t connect to local mysql server through socket '/var/run/mysqld/mysqld.sock”

I have no idea what that means. Any suggestions for how to get this import done?

Thanks,

Mike

Where is your MySQL hostname in there? You aren’t using “localhost”, as all DreamHost MySQL servers have a distinctive hostname and you need to include that when you try to connect:

mysql -u yourdblogin -pyourdbpassword -h yourdbdomain.yourdomain.com yourdb

(From the DreamHost wiki article on MySQL)

–rlparker
–DreamHost Tech Support