Forum Moderators: coopster

Message Too Old, No Replies

Issues connecting PHP to MySQL on Mac OS X

PHP, Mysql, Mac OS X

         

HeadBut

1:47 am on Apr 27, 2006 (gmt 0)

10+ Year Member



Just installed "mysql-debug-5.0.20a-osx10.4-powerpc" on my Powerbook G4 riunning "10.4.6".

Now my phpmyadmin and any other php mysql connections get me this error:

Error

MySQL said: Documentation
#2002 - The server is not responding (or the local MySQL server's socket is not correctly configured)

I tried the apple server solution to fix the mysql.sock, but got this:
sudo chmod 775 /var/mysql
chmod: /var/mysql: No such file or directory

any help or suggestions would be great

Thanks
Earbite

whoisgregg

1:00 pm on Apr 27, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Just to confirm, is this the fix you attempted? [docs.info.apple.com...]

Added: Also, have you taken a look at this more recent article? [docs.info.apple.com...]

Added: Coincidentally, I am setting up a new test server today and will be dealing with installing my own versions of MySQL and PHP on a OS X 10.4.6 Server machine, so I'll keep a detailed log of my actions.

HeadBut

2:38 pm on Apr 27, 2006 (gmt 0)

10+ Year Member



Yea, thats the instructions I used. When it didn't work I assumed it was because I don't have the "Server" version. So, now I tried setting the sock to /tmp/mysql.sock and that works! I also noticed there is no /var/ in my os.
FYI: I started this process by removing the Receipt for the originally installed version of mysql which caused the installer to give me the option of "install" instead of "upgrade".

Hope that helps and thanks for the solution!

whoisgregg

1:36 pm on Apr 28, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Thanks for the info, I'm glad you got it solved. :)

I also noticed there is no /var/ in my os.

From the GUI? What happens in Terminal if you type this command:

 ls /

Then is there a var directory?

HeadBut

2:32 pm on Apr 28, 2006 (gmt 0)

10+ Year Member



I should have said there is no "/var/mysql" in my os.

Sorry for the confusion, Now I've got to get the user account workin! Seems like just adding a new user with phpmyadmin should work, but nothin is that simple!

Thanks
Matt