I am trying to access mysql on dreamhost via a mac terminal. From the terminal I can do:
[ssh -l username domain] to successfully log in to my dreamhost account. Then when I enter [mysql -u username -p password -h hostname database], I get a list of help information about mysql (version 14.14).
However, the prompt doesn’t turn into mysql> or anything, just the normal dreamhost prompt. When I try to enter mysql commands such as [show tables;], I get the error message [-bash: show: command not found]. If I try to type in [mysql>show tables;] I get the message “Can’t connect to local MySQL server through socket…”
Do you know how I can set the prompt to mysql> or do whatever it takes to get the mac terminal to recognize the mysql commands when I am connected to my dreamhost account and the remote mysql serve? Thanks!
More details: I can successfully manipulate my databases on dreamhost using PHPMyAdmin, but am having trouble accessing them via the mac terminal.
When you get a list of help informations, you probably entered something wrong with regards to the params. I think the problem is your “database” part at the end. Just use mysql -u username -p password -h hostname and when you are in, then type use database.