MYSQL - Install problems

Discussion in 'Web Design and Development' started by mariaalf, Nov 23, 2008.

  1. mariaalf macrumors newbie

    Nov 23, 2008
    I have installed MySQL .0.67 in my Mac Book Pro OS X 1.5 and followed the MySQL site instructions for *.dmg.However I must have missed something because after starting the server thru the System Preferences Mysql pane (it says "MySQL running" but when I open a Terminal session, I have always that message for every command:
    -bash: mysql: command not found (even when I am inside the bin directory)
    and in a php test aplication I got the following message:
    mysql_connect() [function.mysql-connect]: Access denied for user 'root'@'localhost' (using password: NO)
    I am a new MAC user so may be it is something too obvious but I am trying and trying and nothing happens .
    Can anyone help me pleeeeease?
    Thanks Maria
  2. angelwatt Moderator emeritus


    Aug 16, 2005
    I believe you mean MySQL version 5.0.67 (not .0.67) and Macbook OSX 10.5 (not 1.5).

    To use MySQL from the command line you'll need to add it to the path environment. To do so, open Terminal and edit your .profile file (or .bash_rc) and add a line like,
    export PATH=/usr/local/mysql:/usr/local/mysql/bin:$PATH
    then save it and close Terminal and open it back up. You should now be able to use the mysql command from the command line. Be sure you have the right location above though. You can check where MySQL is installed from the Terminal by typing in,
    which mysql
    and that will give you the path to MySQL, so you can make sure you're accessing the correct bin folder.

    Frankly though, installing MySQL on its own is more complicated than it should be and is unnecessary. I recommend you install MAMP, which will give you a local web development setup (Apache, PHP, MySQL, etc.). With MAMP installed you still need to edit your path variable to play with it from the command line. You'll edit your .profile like so,
    export PATH=/Applications/MAMP/bin/php5/bin:/Applications/MAMP/Library/bin:$PATH
    in order to use it. The default password is either root or blank (as in ""). I can't remember anymore.

    However, if you do want to install MySQL as you're doing, I recommend Apple's documentation on it. You can also install MySQL through MacPorts.
  3. Lachman macrumors newbie


    Aug 22, 2008
    The Netherlands
    Try using a program called MAMP its free and it instals PHP & Mysql !
    You can buy the program and have a couple of more functions.
    Or you could use the free 1 that I use and it works fine..

Share This Page