473,396 Members | 1,764 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

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 2565
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

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

Similar topics

0
by: MJL | last post by:
This is a mysql/php question (but a little more on the mysql side.) The two are so closely related these days, I thought it would be ok to ask here. I installed on my Suse Linux system mysql 4.0...
0
by: JL | last post by:
Platform: Linux Red Hat RHEL 3 (and red hat 9) Installed MySQL from source. As a matter of fact, installed all LAMPS from source, and the mysql socket file was arranged in a place other than...
0
by: Oliver Etzel - GoodnGo.COM | last post by:
Hello all, after Installing mysql I started the mysql daemon.. The I tried to log in to my mysql database and got the message could not find mysql.sock in /tmp. In the mysql-configuration...
0
by: Oliver Etzel - GoodnGo.COM | last post by:
Hello all, after Installing mysql I started the mysql daemon.. The I tried to log in to my mysql database and got the message could not find mysql.sock in /tmp. In the mysql-configuration...
1
by: jiing | last post by:
Now let me describe what I have done and my purpose: Originally, I want to user ports to install phpBB But I found that phpBB doesn't support mysql 5.x (but the ports installed mySQL 5.0.0...
1
by: jlee | last post by:
I'm pretty much a newbie on mysql, and I need some help. I am running mysql Ver 12.22 Distrib 4.0.24, for portbld-freebsd5.4 (i386) on a server hosting an active website. The site's developer...
2
by: balavignesh | last post by:
Hello frends! I want to connect with mysql using php. In my mysql "my.cnf" file i have specified the socket for both client and server as "/usr/local/mysql/var/mysql.sock" In my "php.ini"...
2
by: Michal Stankoviansky | last post by:
Hi Environment: some version of Slackware, Apache 2.2.x, PHP 5.1.5, MySQL 5.0.24. The issue: I'm using Zend Framework Zend_Db component (which uses PDO). We have 2 mysql socket related...
5
by: scorpionbilli | last post by:
Hi, The local mysql server is running on my Macbook. I can access it through the console client: $ mysql -u root Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.