Installing on OS X


You can install MySQL on OS X from a package, assuming that you have OS X version 10.2 or newer .

If you already have a version of the MySQL server running, you will need to shut it down before installing a new one. You can do this by typing the following at a command prompt:

 
 mysqladmin -u root -p shutdown 

To run the server, you will need to have an account called mysql. If you have OS X 10.2 or above, this account will already exist.

The file you download from MySQL is a .dmg file ”that is, a disk image file. Begin by opening the Finder and double-clicking on the .dmg file.

You will now see the contents of the disk image file. Find the PKG file and double-click on it. For the purposes of this book, you can go along with all the default options that the installer gives you.

You can set up MySQL to start automatically on system startup by adding a StartupItem . You can do this by double-clicking on the file called MySQLStartupItem.pkg that should be located in your .dmg file.

After performing the steps contained in the section "Configuring Your System," you can start the MySQL server by typing the following if you have installed the StartupItem :

 
 sudo /Library/StartupItems/MySQL/MySQL start 

If you have not installed the StartupItem , you can start the server with the following series of commands:

 
 cd /usr/local/mysql sudo ./bin/mysqld_safe 

Now press Ctrl+Z. Finally, type the following command:

 
 bg 

If you have not installed the StartupItem , you will need to repeat these steps each time you restart your system and want to use MySQL.

Please understand that installing MySQL can be quite complex and your experiences may differ due to previously installed versions of MySQL or your version of OS X.



MySQL Tutorial
MySQL Tutorial
ISBN: 0672325845
EAN: 2147483647
Year: 2003
Pages: 261

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net