Connecting to the database from the bash console?


I read the faq and it says that by using this command i can connect to mysql mysql -u -hmysql-server -p

However i get this error after i put my password: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

That file (and path) does not exist

11:35 /var $ ls cache lib log www

Best Regards.

Hi velor -- apologies, it looks like we broke the command in the FAQ. It should be:

mysql -uvelor -hmysql.server -p

...that is, your username has to come after the -u, and the server name is mysql.server, not mysql-server. If you try that now it will work. I'll update the FAQ.

I guess FAQ means Frequently Asked Questions SEWCA...

Sometimes Even With Current Answers...hee hee j/k I know it's tough to keep everything up to date.

I actually love it when you have to update an FAQ entry. It's often a sign that progress is happening!

PA FTW!!!!!!!!!!!!!!!!!!!!!!