Install MySQL in Mac :
Now lets see how to install MySQL in
Mac OS X. From
MySQL 4.0.11, you can install MySQL on
Mac OS X 10.2.x ("Jaguar") and up using a
Mac OS X binary package in
PKG format. Please note that older versions of
Mac OS X(for example, 10.1.x) are not supported by this package. Based on your OS varsion choose the package (if 10.3 choose Mac OS X 10.3 (PowerPC, 32-bit)) and can be downloaded from
http://dev.mysql.com/downloads/.Ater downloading, to Install MySQL double-click on the package icon. This launches the
Mac OS X Package Installer. Due to a bug in the
Mac OS X package installer, you may see this error message in the destination disk selection dialog:
You cannot install this software on this disk(null).
If this error occurs, simply click the Go Back button once to return to the previous screen. Then click Continue to advance to the destination disk selection again, and you should be able to choose the destination disk correctly.
The MySQL installs itself into
/usr/local/mysql-VERSION and also installs a symbolic link,
/usr/local/mysql, that points to the new location.
If you are running
Mac OS X Server, a version of MySQL should already be installed. The following table shows the versions of MySQL that ship with
Mac OS X Server versions.
Mac OS X Server Version | MySQL Version |
10.2-10.2.2 | 3.23.51 |
10.2.3-10.2.6 | 3.23.53 |
10.3 | 4.0.14 |
10.3.2 | 4.0.16 |
10.4.0 | 4.1.10a |
After the installation, you can start up MySQL by running the following commands in a terminal window. You must have administrator privileges to perform this task.
If you have installed the Startup Item, use this command:
shell> sudo /Library/StartupItems/MySQLCOM/MySQLCOM start
(Enter your password, if necessary)
(Press Control-D or enter "exit" to exit the shell)
If you do not use the Startup Item, enter the following command sequence :
shell> cd /usr/local/mysql
shell> sudo ./bin/mysqld_safe
(Enter your password, if necessary)
(Press Control-Z)
shell> bg
(Press Control-D or enter "exit" to exit the shell)
You should be able to connect to the MySQL server, for example, by running /usr/local/mysql/bin/mysql. The accounts that are listed in the MySQL grant tables initially have no passwords. After starting the server, you should set up passwords for them.
In the next section we can see the overview of database.