Author Topic: MySQL path on Mac OS X  (Read 1653 times)

jerad

  • Posts: 1
    • View Profile
MySQL path on Mac OS X
« on: May 14, 2007, 10:18:24 am »
Howdy,

I am attempting to install this software for the first time. I have entered the username password in config.php and created the appropriate user in MySQL.

When I attempt to load the default page for the first time, I receive this error:

Quote
Warning: mysql_connect(): Can't connect to local MySQL server through socket '/var/mysql/mysql.sock' (2) in /Users/webdev/Sites/secure/ListMail/admin.php on line 2946
Could not connect to MySQL. Please check your MySQL database, username, password, and permissions and set up ListMail's config.php
MySQL Error: Can't connect to local MySQL server through socket '/var/mysql/mysql.sock' (2)


Best that I can tell, there is no /var/mysql/ path on my server. The MySQL GUI admin I use reports it's connected via /tmp/mysql.sock

I have MySQL 4.1.21-standard via socket installed on MacOS X 10.4.7.

To resolve this problem, I created a mysql dir in /var and placed a symbolic link:

Code: [Select]
lrwxr-xr-x   1 root  wheel  15 May 14 12:03 mysql.sock -> /tmp/mysql.sock

This appears to have resolved the issue, but I'd like to know if I'm going to run into trouble down the road or if I created a security concern.

DW

  • Administrator
  • Posts: 3787
    • View Profile
    • https://legacy.listmailpro.com
MySQL path on Mac OS X
« Reply #1 on: May 14, 2007, 08:10:01 pm »
Greetings,

I do not believe you have created a security concern.  The original file, after all, resided in the insecure /tmp folder.  When you connect to MySQL via hostname it should automatically use the correct path - I suppose it must be determined by the PHP<>MySQL configuration.

Regards
Dean Wiebe
ListMailPRO Author & Developer - Help | Support | Hosting