Can't connect to local MySQL server through socket... MacOSX

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
User avatar
dstefani
Forum Contributor
Posts: 140
Joined: Sat Jan 11, 2003 9:34 am
Location: Meridian Idaho, USA

Can't connect to local MySQL server through socket... MacOSX

Post by dstefani »

Mac OSX 10.3.9 / MySQL 4.1.13-max

I can connect to MySQL through navicat, but not through a web browser.
This happened after I restarted my computer.

So I opened the err file and watched it as I restarted MySQL, it seems happy.
Here's the log as it started:
060531 15:07:09 mysqld started
060531 15:07:09 [Warning] Setting lower_case_table_names=2 because file system for /usr/local/mysql/data/ is case insensitive
060531 15:07:09 InnoDB: Started; log sequence number 0 19853645
/usr/local/mysql/bin/mysqld: ready for connections.
Version: '4.1.13-max' socket: '/tmp/mysql.sock' port: 3306 MySQL Community Edition - Experimental (GPL)
TOP shows mysqld running

there is a /tmp/mysql.sock

But here's the error my web page gives me:
Warning: mysql_connect() [function.mysql-connect]: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (13) in /Users/myname/Sites/mysite/includes/incConnect.php on line 13
Could not connect : Can't connect to local MySQL server through socket '/tmp/mysql.sock' (13)
And I can run mysql> from a shell.

Am I looking right at the problem?

Thanks,

dstefani
User avatar
dstefani
Forum Contributor
Posts: 140
Joined: Sat Jan 11, 2003 9:34 am
Location: Meridian Idaho, USA

So Dumb

Post by dstefani »

After the last update for OSX I didn't restart my box, when I did it changed the permissions on the /tmp dir.

- DUHHHH
Post Reply