469,319 Members | 2,425 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

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

Mac OS 10.3 -- Can't connect to local MySQL server through socket '/tmp/mysql.sock'

Dear All,

I just downloaded & installed MYSQL. It seemed to work and I can start
it and enter my password and change a directory but that is about all.
I have been ready and playing "hit & miss" all afternoon and it seems
to have something to do with the "mysql_install_db" not being
installed correctly -- I have tried multiple installs with multiple

My log. . .

Last login: Tue Dec 30 19:34:56 on ttyp1
Welcome to Darwin!
Ians-Computer:~ ian$ sudo /Library/StartupItems/MySQL/MySQL start
Starting MySQL database server
Ians-Computer:~ ian$ cd /usr/local/mysql
Ians-Computer:/usr/local/mysql ian$ /usr/local/mysql/bin/mysql
ERROR 2002: Can't connect to local MySQL server through socket
'/tmp/mysql.sock' (61)
IIans-Computer:/usr/local/mysql ian$

I also did a command line search for "mysql_install_db" and it was

In one article I read. . . " If you don't have write access to create
a socket file at the default place (in `/tmp') or permission to create
temporary files in `/tmp,'you will get an error when running
mysql_install_db or when starting or using mysqld. "

This could be my problem.
But I can not decifer the solution provided. . .

You can specify a different socket and temporary directory as follows:
shell> TMPDIR=/some_tmp_dir/
shell> MYSQL_UNIX_PORT=/some_tmp_dir/mysqld.sock

See section A.4.5 How to Protect or Change the MySQL Socket File
`/tmp/mysql.sock'. `some_tmp_dir' should be the path to some directory
for which you have write permission. See section F Environment
Variables. After this you should be able to runmysql_install_db and
start the server with these commands:
shell> scripts/mysql_install_db
shell> BINDIR/mysqld_safe &

thanks in advance for any help you can provide.

Jul 19 '05 #1
0 2992

This discussion thread is closed

Replies have been disabled for this discussion.

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 zhoujie | last post: by
reply views Thread by suresh191 | last post: by
reply views Thread by mdpf | last post: by
reply views Thread by harlem98 | last post: by
reply views Thread by listenups61195 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.