Apache, PHP, MySQL - Development Area

Discussion in 'Mac Basics and Help' started by Ed91, Sep 20, 2008.

  1. Ed91 macrumors 6502

    Joined:
    Dec 22, 2007
    #1
    Hey, I'm looking for a little help setting up MySQL to work with my current web development setup which is just PHP / Apache at the moment, and works just how I want it to (using the installs supplied with the OS).

    However, after installing MySQL, I'm not really sure what I need to change to get it working with PHP. If I try to connect to a database through a simple PHP script, I get the error:


    Warning: mysql_connect() [function.mysql-connect]: Can't connect to local MySQL server through socket '/var/mysql/mysql.sock' (2) in /Users/dev/Sites/testing/mysql.php on line 6
    Can't connect to local MySQL server through socket '/var/mysql/mysql.sock' (2)

    Now, I know that I don't have a "mysql" folder in /var/ so I'm guessing PHP is looking n the wrong place. Am I right? If so, how do I change the settings so that PHP can find/connect?

    Thanks in advance for any help you guys can offer :)
     
  2. Ed91 thread starter macrumors 6502

    Joined:
    Dec 22, 2007
    #3
    That was exactly what I needed to know! Thanks!

    Ed
     

Share This Page