Bug #35110 Can't start the server after installing MySQL
Submitted: 6 Mar 2008 14:05 Modified: 14 Mar 2008 22:38
Reporter: Vladimí­r Župka Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server: Installing Severity:S1 (Critical)
Version:5.1 - 64bit OS:MacOS (10.5.2)
Assigned to: CPU Architecture:Any
Tags: mysql-5.1.23-rc

[6 Mar 2008 14:05] Vladimí­r Župka
Description:
After installing MySQL package, I issued command 
   mysql -u root 
which responded by the following error message:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
This is true, because there is no such file in /tmp. 

>Release:       mysql-5.1.23-rc (MySQL Community Server (GPL))

>C compiler:    i686-apple-darwin9-gcc-4.0.1 (GCC) 4.0.1 (Apple Inc. build 5465)
>C++ compiler:  i686-apple-darwin9-gcc-4.0.1 (GCC) 4.0.1 (Apple Inc. build 5465)
>Environment:
        <machine, os, target, libraries (multiple lines)>
System: Darwin Macintosh.local 9.2.0 Darwin Kernel Version 9.2.0: Tue Feb  5 16:13:22 PST 2008; root:xnu-1228.3.13~1/RE\
LEASE_I386 i386

How to repeat:
Install the package again and try mysql -u root command.
[6 Mar 2008 21:38] Valeriy Kravchuk
Thank you for a problem report. Have you started MySQL server? Please, send the results of:

ps -ef | grep mysqld
[7 Mar 2008 8:09] Vladimí­r Župka
Macintosh:~ vzupka$ /bin/csh
[Macintosh:~] vzupka% ps -ef | grep mysqld
  501   235   233   0   0:00.00 ttys000    0:00.00 grep mysqld
[Macintosh:~] vzupka%

Macintosh:~ vzupka$ /usr/local/mysql-5.1.23-rc-osx10.5-x86_64/bin/mysqld ; exit;
080307  8:44:03 [Warning] Can't create test file /usr/local/mysql-5.1.23-rc-osx10.5-x86_64/data/Macintosh.lower-test
080307  8:44:03 [Warning] Can't create test file /usr/local/mysql-5.1.23-rc-osx10.5-x86_64/data/Macintosh.lower-test
/usr/local/mysql-5.1.23-rc-osx10.5-x86_64/bin/mysqld
[Process completed]

[Macintosh:/usr/local/mysql-5.1.23-rc-osx10.5-x86_64] vzupka% sudo ./scripts/mysql_install_db
Password:
Installing MySQL system tables...
OK
Filling help tables...
OK

[Macintosh:/usr/local/mysql-5.1.23-rc-osx10.5-x86_64] vzupka% ./bin/mysqld
080307  9:06:03 [Warning] Can't create test file /usr/local/mysql-5.1.23-rc-osx10.5-x86_64/data/Macintosh.lower-test
080307  9:06:03 [Warning] Can't create test file /usr/local/mysql-5.1.23-rc-osx10.5-x86_64/data/Macintosh.lower-test
./bin/mysqld: Can't change dir to '/usr/local/mysql-5.1.23-rc-osx10.5-x86_64/data/' (Errcode: 13)
080307  9:06:03 [ERROR] Aborting

080307  9:06:03 [Note] ./bin/mysqld: Shutdown complete

mysql -u root still tells: 
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)

Regards, Vladimír
[7 Mar 2008 20:17] Valeriy Kravchuk
Please, send the results of:

ls -l /usr/local/mysql-5.1.23-rc-osx10.5-x86_64/
[8 Mar 2008 7:28] Vladimí­r Župka
Macintosh:~ vzupka$ /bin/csh
[Macintosh:~] vzupka% ls -l /usr/local/mysql-5.1.23-rc-osx10.5-x86_64/
total 88
-rw-r--r--   1 root    wheel  19071 30 led 00:55 COPYING
-rw-r--r--   1 root    wheel   5139 30 led 00:55 EXCEPTIONS-CLIENT
-rw-r--r--   1 root    wheel   8786 30 led 00:55 INSTALL-BINARY
-rw-r--r--   1 root    wheel   1410 30 led 00:55 README
drwxr-xr-x  65 root    wheel   2210  6 bře 14:07 bin
drwxr-x---   4 _mysql  wheel    136  7 bře 09:05 data
drwxr-xr-x  35 root    wheel   1190  6 bře 14:07 include
drwxr-xr-x   3 root    wheel    102  6 bře 14:07 info
drwxr-xr-x  43 root    wheel   1462  6 bře 14:07 lib
drwxr-xr-x   4 root    wheel    136 30 led 00:54 man
drwxr-xr-x  17 root    wheel    578  6 bře 14:07 mysql-test
drwxr-xr-x   3 root    wheel    102  6 bře 14:07 scripts
drwxr-xr-x  35 root    wheel   1190  6 bře 14:07 share
drwxr-xr-x  29 root    wheel    986  6 bře 14:07 sql-bench
drwxr-xr-x  13 root    wheel    442  6 bře 14:07 support-files
[Macintosh:~] vzupka%
[8 Mar 2008 10:14] Valeriy Kravchuk
Please, note this:

drwxr-x---   4 _mysql  wheel    136  7 bře 09:05 data

data directory belongs to _mysql user, and has no write permission for anybody else. Can you try to run mysqld as _mysql or root user and check if it will make any difference.
[9 Mar 2008 8:34] Vladimí­r Župka
[Macintosh:/usr/local/mysql-5.1.23-rc-osx10.5-x86_64] vzupka% ./bin/mysqld --user=root
080309  9:26:28 [Warning] Can't create test file /usr/local/mysql-5.1.23-rc-osx10.5-x86_64/data/Macintosh.lower-test
080309  9:26:28 [Warning] Can't create test file /usr/local/mysql-5.1.23-rc-osx10.5-x86_64/data/Macintosh.lower-test
./bin/mysqld: Can't change dir to '/usr/local/mysql-5.1.23-rc-osx10.5-x86_64/data/' (Errcode: 13)
080309  9:26:28 [ERROR] Aborting

080309  9:26:28 [Note] ./bin/mysqld: Shutdown complete

[Macintosh:/usr/local/mysql-5.1.23-rc-osx10.5-x86_64] vzupka% ./bin/mysqld --user=_mysql
080309  9:26:54 [Warning] Can't create test file /usr/local/mysql-5.1.23-rc-osx10.5-x86_64/data/Macintosh.lower-test
080309  9:26:54 [Warning] Can't create test file /usr/local/mysql-5.1.23-rc-osx10.5-x86_64/data/Macintosh.lower-test
./bin/mysqld: Can't change dir to '/usr/local/mysql-5.1.23-rc-osx10.5-x86_64/data/' (Errcode: 13)
080309  9:26:54 [ERROR] Aborting

080309  9:26:54 [Note] ./bin/mysqld: Shutdown complete

[Macintosh:/usr/local/mysql-5.1.23-rc-osx10.5-x86_64] vzupka% sudo ls ./data
Password:
mysql	test
[Macintosh:/usr/local/mysql-5.1.23-rc-osx10.5-x86_64] vzupka%
[14 Mar 2008 22:38] Sveta Smirnova
Please do not submit the same bug more than once. An existing bug report already describes this very problem. Even if you feel that your issue is somewhat different, the resolution is likely
to be the same. Because of this, we hope you add your comments to the original bug instead.

Thank you for your interest in MySQL.

Duplicate of bug #28854

Please wait next release.