Strange mysql problem moving website from Ubuntu server to Mac server

Posted by evan on Server Fault See other posts from Server Fault or by evan
Published on 2011-02-24T22:41:56Z Indexed on 2011/02/24 23:26 UTC
Read the original article Hit count: 251

Filed under:
|

I'm moving a website (php/mysql) from an Ubuntu server to a OSX 10.6 server. I've set up apache to run php scripts and setup the newest version of mysql on the mac. I just copied all of the php files and dumped/imported all of the mysql databases (including the mysql users database).

When I visit the page being served on the Mac the page is able to connect to the database, but not query. Specifically this function

mysql_error()

is returning this error message

NO SUCH FILE OR DIRECTORY

The reason it's strange is that I'm able to change the php connection strings for mysql on the Ubuntu server so that it points to the Mac server and the page works correctly (so it seems mysql is correctly set up on the mac and definitely contains all of the users and tables it should).

Thinking it was something to do with file permissions on the mac, I've changed all of the files 755 and it hasn't helped.

Any ideas? Thanks!!

UPDATE: I've found this error which I'm relatively certain is related to this problem in /var/log/apache2/error_log

PHP Warning:  mysql_query(): A link to the server could not be established

© Server Fault or respective owner

Related posts about macosx

Related posts about webserver