I've successfully (I think) installed CMS Made Simple 1.6.5 on my OS X, 10.4.11, machine running apache 1 and php 4 (Just above the minimum requirements). Everything is ready with chmod 777, I believe. After finishing installation, I go to the admin page, but cannot get to log in with this error:
Can't connect to local MySQL server through socket '/var/mysql/mysql.sock'
OK, I'm actually running MySql on usr/local/ where my Rails apps are able to find it. I see the mysql.sock is here: /tmp/mysql.sock
It seems like an environment variable is needed to be altered, but when I searched through all my cms made simple files for 'var/mysql/mysql.sock' I come up with nothing.
So this is where I am, how can I get cms mades simple to find my mysql port? I've got a database set up called cms and have a user with all privileges called 'cms_user'
What should I do to find my MySql db? I want to test it on my machine before I deploy to a working website, thanx, sam
Where is '/var/mysql/mysql.sock'
Re: Where is '/var/mysql/mysql.sock'
Just search /etc/php.ini for mysql.default_sock and set it to this.
mysql.default_socket = /tmp/mysql.sock

Restart apache 1 and that should do it.
The setting is in PHP not CMSMS.
mysql.default_socket = /tmp/mysql.sock

Restart apache 1 and that should do it.
The setting is in PHP not CMSMS.
Re: Where is '/var/mysql/mysql.sock'
Hi,sam452 wrote: ...
Can't connect to local MySQL server through socket '/var/mysql/mysql.sock'
...
What should I do to find my MySql db? I want to test it on my machine before I deploy to a working website, thanx, sam
It sounds like there is a config file with the wrong 'socket' variable specified for your client (i.e., PHP app on apache). Last time I looked, MySQL supported multiple levels of config files: global (in /etc/my.cnf), server specific (in /__Your_MySQL_Install_Dir__/mysql-data-dir/my.cnf), and user specific (~/.my.cnf). You can also specify a PHP specific MySQL socket in your /etc/php.ini file. Lot's of places to type the wrong thing.

You might look through your config file(s) and verify that you've configured your client to connect on the same socket as the server handling your cmsms database.
Your config will vary, but here is an excerpt from my /etc/my.cnf (on openSUSE 11.1) where you can see that the client and server are using the same named socket:
Code: Select all
...
# The following options will be passed to all MySQL clients
[client]
...
socket = /var/lib/mysql/mysql.sock
# Here follows entries for some specific programs
# The MySQL server
[mysqld]
...
socket = /var/lib/mysql/mysql.sock
Fred
Last edited by fredp on Sun Sep 13, 2009 11:31 pm, edited 1 time in total.
Nearly all men can stand adversity, but if you want to test a man's character, give him power.
- Abraham Lincoln
- Abraham Lincoln