472,101 Members | 1,444 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

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

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

Ian
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
downloaws.

My log. . .

Last login: Tue Dec 30 19:34:56 on ttyp1
Welcome to Darwin!
Ians-Computer:~ ian$ sudo /Library/StartupItems/MySQL/MySQL start
Password:***********
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
missing.

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
shell> export TMPDIR MYSQL_UNIX_PORT

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.

ian
Jul 19 '05 #1
0 3151

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
reply views Thread by leo001 | last post: by

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.