Results 1 to 8 of 8
  1. #1
    Installing mySQl on Mac OS X
    Hi, I wonder if anyone can be of assistance. I am doing a few web projects at the moment in PHP using mySQL as a back end but it's so time consuming to keep FTPing the files up to my ISP to test every change.

    So I decided to install PHP and mySQL on my Mac running Mac OS X 10.3. Installation of PHP went very smoothly and is running fine with the Apache installation that came with Mac OS X. However I am really struggling to get mySQL up and running. DOwnlaoded it from the mySQL site and run the install and followed the instructions as best I could but I have no idea how to link it in with PHP and have no idea to test if it's installed okay or check if it's running. Can someone please offer me some simple step by step instructions?

    Thanks in advance,

    Richard Seale

  2. #2
    I recommend Marc Liyanage's site:

    There seems to be a lot of info there. Like you, I have tried to install php and mysql so that I can build dynamic sites locally. BUT, I got into a mess of stuff and I don't think mysql is installed properly... so I kinda gave up. Until I rebuild my system and start over again.

  3. #3

    Murlyn's Avatar
    Member Since
    Jun 11, 2003
    Mount Vernon, WA
    MacBook Pro 2.6 GHz Core 2 Duo 4GB RAM OS 10.5.2
    Install phpMyAdmin that will help you figure out if it is running or not.

  4. #4
    Ping port 3306, should get a response if mySql is up.

    I use the Navicat client to access mySql.

  5. #5
    You don't need to link mysql to php. It's more of a loading php modules in your apache config file. To see if MySQL is functional, from a terminal window,

    cd /usr/local/mysql/bin

    If the server is running you should get this:
    Welcome to the MySQL monitor. Commands end with ; or \g.
    Your MySQL connection id is 60 to server version: 4.0.20-standard

    Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

    If not, you should get something like this

    ERROR 2002: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
    To make sure your php is configured properly, create a test.php file with the following in it:


    If when you load http://localhost/test.php you see your php configs then you properly set up the module in apache.

    Finally get a copy of phpmyadmin. Once you copy that to your site directory you only have to add the phpmyadmin home directory to the config file and if everything is configured, you'll have access to your database.

  6. #6
    If anyone else wants to do the above, check out this tutorial

  7. #7
    If all you need is to test your projects, I highly recommend using MAMP (Macintosh, Apache, MySQL, PHP). It has worked fine for me and installing it is a breeze.

    Note: By default, you need to specify port when connecting to mysql or localhost:
    PHP Code:
    $link mysql_connect"""root""root" ); 
    Good luck

  8. #8
    NOTE :: Please advise all Mac users you know to use the installer packages at Complete PHP, Complete Apache, Complete MySQL

    Installations do NOT get any easier than this...

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Installing MySQL on Mac OS X 10.6.8
    By jabo in forum OS X - Operating System
    Replies: 0
    Last Post: 06-06-2012, 09:28 PM
  2. Installing PHP and MySQL on Snow Leopard workstation.
    By Unibody in forum OS X - Development and Darwin
    Replies: 3
    Last Post: 12-19-2009, 10:23 PM
  3. Installing MySql extension for PHP
    By cmessineo in forum OS X - Development and Darwin
    Replies: 0
    Last Post: 05-20-2009, 11:18 AM
  4. question about installing MySQL on a mac
    By hintbanana in forum Web Design and Hosting
    Replies: 3
    Last Post: 02-06-2008, 05:03 AM
  5. installing MySql
    By jeffersno1 in forum Web Design and Hosting
    Replies: 9
    Last Post: 06-19-2006, 04:46 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts