469,091 Members | 1,154 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

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

Stupid mysql.sock

helimeef
Hi. I am trying to set up MySQL on Unix (Mac OS X). When I try to start mysql with the terminal command
Expand|Select|Wrap|Line Numbers
  1. /usr/local/mysql/bin/mysql --user=root --password=my_pass
I receive the error:
Expand|Select|Wrap|Line Numbers
  1. ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/mysql/mysql.sock' (2)
I just had it working yesterday! Before it restarted...
And yes I have looked at my.cnf to make sure it is pointing in the right place.

Also, when I run PhpMyAdmin I receive the same error. PHP is also pointing in the right place. Could this just be a case of mysql.sock not existing?
Thanks,
Steven.
Mar 13 '08 #1
6 2315
r035198x
13,262 8TB
Hi. I am trying to set up MySQL on Unix (Mac OS X). When I try to start mysql with the terminal command
Expand|Select|Wrap|Line Numbers
  1. /usr/local/mysql/bin/mysql --user=root --password=my_pass
I receive the error:
Expand|Select|Wrap|Line Numbers
  1. ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/mysql/mysql.sock' (2)
I just had it working yesterday! Before it restarted...
And yes I have looked at my.cnf to make sure it is pointing in the right place.

Also, when I run PhpMyAdmin I receive the same error. PHP is also pointing in the right place. Could this just be a case of mysql.sock not existing?
Thanks,
Steven.
Try running the mysqld_safe command first.
Mar 13 '08 #2
Try running the mysqld_safe command first.
Thanks for the help; but I just removed my MySQL directory and I'm compiling it from the source. HOPEFULLY, it will work.
Mar 13 '08 #3
r035198x
13,262 8TB
Thanks for the help; but I just removed my MySQL directory and I'm compiling it from the source. HOPEFULLY, it will work.
Chances are MySQL simply did not start automatically after you restarted the machine and all you needed to do was start it manually.
Mar 13 '08 #4
Chances are MySQL simply did not start automatically after you restarted the machine and all you needed to do was start it manually.
Well I typed in:
Expand|Select|Wrap|Line Numbers
  1. /usr/local/mysql/bin/mysqld_safe
And I received this load of bollocks:
Expand|Select|Wrap|Line Numbers
  1. touch: /usr/local/mysql/data/new-host.home.err: Permission denied
  2. chown: /usr/local/mysql/data/new-host.home.err: Permission denied
  3. Starting mysqld daemon with databases from /usr/local/mysql/data
  4. /usr/local/mysql/bin/mysqld_safe: line 380: /usr/local/mysql/data/new-host.home.err: Permission denied
  5. rm: /usr/local/mysql/data/new-host.home.pid: Permission denied
  6. /usr/local/mysql/bin/mysqld_safe: line 388: /usr/local/mysql/data/new-host.home.err: Permission denied
  7. STOPPING server from pid file /usr/local/mysql/data/new-host.home.pid
  8. tee: /usr/local/mysql/data/new-host.home.err: Permission denied
  9. 080313 15:05:58  mysqld ended
  10. tee: /usr/local/mysql/data/new-host.home.err: Permission denied
  11.  
I have no idea what's going on... I'm new to Unix (I just switched from Windows last week), and I'm very confused...
Mar 13 '08 #5
r035198x
13,262 8TB
Well I typed in:
Expand|Select|Wrap|Line Numbers
  1. /usr/local/mysql/bin/mysqld_safe
And I received this load of bollocks:
Expand|Select|Wrap|Line Numbers
  1. touch: /usr/local/mysql/data/new-host.home.err: Permission denied
  2. chown: /usr/local/mysql/data/new-host.home.err: Permission denied
  3. Starting mysqld daemon with databases from /usr/local/mysql/data
  4. /usr/local/mysql/bin/mysqld_safe: line 380: /usr/local/mysql/data/new-host.home.err: Permission denied
  5. rm: /usr/local/mysql/data/new-host.home.pid: Permission denied
  6. /usr/local/mysql/bin/mysqld_safe: line 388: /usr/local/mysql/data/new-host.home.err: Permission denied
  7. STOPPING server from pid file /usr/local/mysql/data/new-host.home.pid
  8. tee: /usr/local/mysql/data/new-host.home.err: Permission denied
  9. 080313 15:05:58  mysqld ended
  10. tee: /usr/local/mysql/data/new-host.home.err: Permission denied
  11.  
I have no idea what's going on... I'm new to Unix (I just switched from Windows last week), and I'm very confused...
Did you install MySQL as root?
Mar 14 '08 #6
I compiled MySQL under root (by using "su -" and then typing in my password), and when I run /usr/local/mysql/bin/mysql I get "ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/mysql/mysql.sock' (2)", and running /usr/local/mysql/bin/mysqld_safe I get the same crap I got in my last post.
I wish I know what I did 2 days ago when I got it to work... Something on drupal.com that told me how to "configure MySQL for drupal" and it ended up fixing my problem... I just wish I could find the page again, and after 2 hours of searching, I gave up.
Mar 14 '08 #7

Post your reply

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

Similar topics

reply views Thread by MJL | last post: by
reply views Thread by Oliver Etzel - GoodnGo.COM | last post: by
reply views Thread by Oliver Etzel - GoodnGo.COM | last post: by
2 posts views Thread by balavignesh | 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 zhoujie | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.