Trying to set up a testing server & MySQL Problem

Discussion in 'Web Design and Development' started by mripah, Jul 5, 2013.

  1. macrumors newbie

    Joined:
    Oct 10, 2010
    #1
    Hello all,

    Just bought a Macbook Air. I'm trying to set up a testing server on it but I'm stuck at a particular step.

    I have apache set up and can reach the Sites folder I created in my home directory.

    http://127.0.0.1/~username/sqrt/

    I have php running as the info.php file I created works.

    My issue is with mysql.

    I downloaded and installed the latest version from mysql.com and installed it. I installed the preference panel. But is there a guide on creating and maintaining a mysql instance from the command line? Every one I see saying to start by typing mysql in terminal, but it tells me that it's not installed. But the preference panel tells me different. Thanks.
     
  2. macrumors newbie

    Joined:
    Jul 26, 2012
    #2
    Can you try this in the terminal
    Code:
    which mysql
    Your $PATH might not be including your fresh install of MySQL.
    As an example, for my current installation, the bin is in /usr/local/mysql/bin/mysql
     
  3. mripah, Jul 5, 2013
    Last edited: Jul 5, 2013

    thread starter macrumors newbie

    Joined:
    Oct 10, 2010
    #3
    Hmm that command just returns me to the prompt without any information.

    However I see:
    /usr/local/mysql/bin/mysql

    At the same path on my machine.
     
  4. macrumors 65816

    Joined:
    Apr 17, 2012
    Location:
    Destin, FL
    #4
    Might I recommend MAMP?

    There's nothing wrong with the way you are doing it, after the setup it's rock solid. I just find MAMP too easy NOT to use.
     
  5. macrumors newbie

    Joined:
    Jul 5, 2013
    #5
    Hi,

    I´m not sure what is wrong but in my case i needed to run a script to complete the mysql installation, in the mysql folder i executed this command:
    ./scripts/mysql_install_db

    You can start the MySQL daemon with:
    cd . ; ./bin/mysqld_safe &

    Hope it helps.

    Regards,
    Edu


     
  6. thread starter macrumors newbie

    Joined:
    Oct 10, 2010
    #6
    Well I downloaded Sequel Pro and was able to connect and create a database and a new user, plus grant permissions. (Bare in mind this is all new to me.)

    But I can't connect in Coda2 which is what I'm using for development. Not sure why I can connect in one but not the other. The error I'm getting in Coda is:

    http://db.tt/pOwF8Zim

    I'm trying to connect via MySQL Socket.

    ----------

    I think it's installed and running. It says it's running in the preference panel and when I look at all process, I can see it running happily there.
     
  7. mripah, Jul 5, 2013
    Last edited: Jul 5, 2013

    thread starter macrumors newbie

    Joined:
    Oct 10, 2010
    #7
    Well I figured out how to connect from Coda, I had to connect to /tmp/mysql.sock. Is there a "Hello world" query I can run to make sure I'm connected and it's running?
     
  8. macrumors newbie

    Joined:
    Jul 5, 2013
    #8
    Hi, a simple query to test mysql could be:
    select now();

     

Share This Page