MySQL Forums
Forum List  »  Ruby

ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
Posted by: vartika singh
Date: October 20, 2011 05:30PM

Since yesterday I am trying to set up mysql on my Lion. I am not able to start mysql client through terminal. I have tried a lot of things as I found on google. Can someone please have a look and let me know if I am doing a blunder or similar?

➜ expertiza git:(master) ✗ bundle install
Using rake (0.9.2)
Using RedCloth (4.2.8)
Using activesupport (2.3.14)
Using rack (1.1.2)
Using actionpack (2.3.14)
Using actionmailer (2.3.14)
Using activerecord (2.3.14)
Using activeresource (2.3.14)
Using builder (2.1.2)
Using highline (1.6.2)
Using net-ssh (2.2.1)
Using net-scp (1.0.4)
Using net-sftp (2.0.5)
Using net-ssh-gateway (1.1.0)
Using capistrano (2.9.0)
Using culerity (0.2.15)
Using mime-types (1.16)
Using nokogiri (1.5.0)
Using rack-test (0.6.1)
Using ffi (1.0.10)
Using childprocess (0.2.2)
Using json_pure (1.6.1)
Using rubyzip (0.9.4)
Using selenium-webdriver (2.8.0)
Using capybara (0.3.9)
Using cgi_multipart_eof_fix (2.5.0)
Using columnize (0.3.4)
Using diff-lcs (1.1.3)
Using json (1.4.6)
Using term-ansicolor (1.0.7)
Using gherkin (2.2.9)
Using cucumber (0.9.4)
Using cucumber-rails (0.3.2)
Using daemons (1.1.4)
Using database_cleaner (0.6.7)
Using expertiza-authlogic (2.1.6.1)
Using fastercsv (1.5.4)
Using fastthread (1.0.7)
Using gdata (1.1.2)
Using gem_plugin (0.2.3)
Using hoptoad_notifier (2.4.11)
Using rbx-require-relative (0.0.5)
Using linecache (0.46)
Using mongrel (1.1.5)
Using mysql (2.8.1)
Using rails (2.3.14)
Using rdoc (3.11)
Using stream (0.5)
Using rgl (0.4.0)
Using ruby-debug-base (0.10.4)
Using ruby-debug (0.10.4)
Using bundler (1.0.21)
Your bundle is complete! Use `bundle show [gemname]` to see where a bundled gem is installed.

➜ sockets git:(master) ✗ brew upgrade mysql
==> Upgrading mysql
==> Downloading http://downloads.mysql.com/archives/mysql-5.5/mysql-5.5.15.tar.g
File already downloaded in /Users/vsingh3/Library/Caches/Homebrew
Error: MD5 mismatch
Expected: 306b5549c7bd72e8e705a890db0da82b
Got: d41d8cd98f00b204e9800998ecf8427e
Archive: /Users/vsingh3/Library/Caches/Homebrew/mysql-5.5.15.tar.gz
(To retry an incomplete download, remove the file above.)

➜ expertiza git:(master) ✗ mysql -u root -p
Enter password:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)

➜ expertiza git:(master) ✗ cd tmp

➜ tmp git:(master) ✗ cd sockets

➜ sockets git:(master) ✗ ls
mysql.sock

➜ sockets git:(master) ✗ vim mysql.sock
mysql.default_socket =/expertiza/tmp/sockets/mysql.sock --- I wrote this in mysql.sock file.

Options: ReplyQuote


Subject
Written By
Posted
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
October 20, 2011 05:30PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.