469,313 Members | 2,623 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,313 developers. It's quick & easy.

Can't connect to local MySQL server through socket on Ubuntu.

129 100+
Hi friends,
I installed mysql in ubuntu but, i don't know how to connect to that mysql. Actually we connect to postgresql by psql command, but when i tried to connect mysql with mysql command but it displaying this error:

ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

when i give mysql databasename it displaying the following error:

Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

So friends, what is the solution for this problem?
Sep 27 '08 #1
1 8481
Atli
5,058 Expert 4TB
Hi.

I would guess that your MySQL service is stopped. It needs to be started before you can start using it.

On Ubuntu, this command should start it up:
Expand|Select|Wrap|Line Numbers
  1. sudo /etc/init.d/mysql start
P.S.
Please try to give your threads descriptive titles, so that they can be found by others with similar problems and so the experts can quickly find threads they can help with.

If your having trouble doing that, try using phrases you would be likely to use when searching for an answer in a search engine, like Google.
You should also check out the Posting Guidelines for more tips on how to construct a good thread title.

Thank you.
Moderator
Sep 27 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

reply views Thread by Bill Hernandez | last post: by
2 posts views Thread by xiuchuanli | last post: by
5 posts views Thread by scorpionbilli | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by suresh191 | last post: by
reply views Thread by harlem98 | last post: by
1 post views Thread by Geralt96 | last post: by
reply views Thread by harlem98 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.