PIM600 Installing MySQL on Mac OSX

1. Download the free MySQL package from www.mysql.com (at the end of the page).

2. doubleclick on the downloaded disk image file "mysql-standard-4.0.18.dmg" (or similar) to mount the Image.

3. To install the MySQL double click on the "mysql-standard-4.0.18.pkg" Package and follow the menu.

  • MySQL installation requires a Max OS X user account named 'mysql' which should exist by default.
  • MySQL will install itself into '/usr/local/mysql-<verrsion>' and install a symbolic link
  • 'usr/local/mysql' pointing to the new location.
  • all MySQL binaries are located in the directory 'usr/local/mysql/bin'.

4. If you want to automatically start MySQL during system bootup, you need to install the MySQL Startup Item by doubleclicking "MySQLStartupItem.pkg"

  • The startup item is installed inot '/Library/StartupItems/MySQL' by adding 'MYSQLCOM=-YES-' to the system configuration file '/etc/hostconfig'

5. Start up the Mac Terminal Window 'OS X/Programs/Utilities/Terminal' and go to the root directory cd /

6. Move to the new MySQL directory and check the content of each directory with 'ls' or 'ls -l'

  • cd usr
  • cd local
  • cd mysql
  • cd bin

7. Start MySQL

  • when using the Start up Item type: sudo /Library/StartupItems/MySQL/MySQL start
  • when not using hte Startup item type:cd /usr/local/mysql
    sudo ./bin/mysqld_safe

enter your Password:, reply is: Starting MySQL database server

8. enter 'usr/local/bin/mysql' to start the MySQL.

For a List of all MySQL commands type 'help' or '\h', for an online Manual see http://www.mysql.com/documentation

9.

 

Use CocoaMySQL to easily use MySQL (pi601)