You should keep the following issues and notes in mind:
The default location for the MySQL Unix socket is different on Mac OS X and Mac OS X Server depending on the installation type you chose. The following table shows the default locations by installation type.
Table 2.7. MySQL Unix Socket Locations on Mac OS X by Installation Type
Installation Type Socket Location Package Installer from MySQL /tmp/mysql.sockTarball from MySQL /tmp/mysql.sockMySQL Bundled with Mac OS X Server /var/mysql/mysql.sockTo prevent issues, you should either change the configuration of the socket used within your application (for example, changing
php.ini), or you should configure the socket location using a MySQL configuration file and thesocketoption. For more information, see Section 5.1.2, “Server Command Options”.You may need (or want) to create a specific
mysqluser to own the MySQL directory and data. On Mac OS X 10.4 and lower you can do this by using the Netinfo Manager application, located within theUtilitiesfolder within theApplicationsfolder. On Mac OS X 10.5 and later you can do this through the Directory Utility. From Mac OS X 10.5 and later (including Mac OS X Server 10.5) themysqlshould already exist. For use in single user mode, an entry for_mysql(note the underscore prefix) should already exist within the system/etc/passwdfile.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, click the
Go Backbutton once to return to the previous screen. Then clickContinueto advance to the destination disk selection again, and you should be able to choose the destination disk correctly. We have reported this bug to Apple and it is investigating this problem.Because the MySQL package installer installs the MySQL contents into a version and platform specific directory, you can use this to upgrade and migrate your database between versions. You will need to either copy the
datadirectory from the old version to the new version, or alternatively specify an alternativedatadirvalue to set location of the data directory.You might want to add aliases to your shell's resource file to make it easier to access commonly used programs such as mysql and mysqladmin from the command line. The syntax for bash is:
alias mysql=/usr/local/mysql/bin/mysql alias mysqladmin=/usr/local/mysql/bin/mysqladmin
For tcsh, use:
alias mysql /usr/local/mysql/bin/mysql alias mysqladmin /usr/local/mysql/bin/mysqladmin
Even better, add
/usr/local/mysql/binto yourPATHenvironment variable. You can do this by modifying the appropriate startup file for your shell. For more information, see Section 4.2.1, “Invoking MySQL Programs”.After you have copied over the MySQL database files from the previous installation and have successfully started the new server, you should consider removing the old installation files to save disk space. Additionally, you should also remove older versions of the Package Receipt directories located in
/Library/Receipts/mysql-.VERSION.pkg