wiki:MySqlManual

MySQL 5.1 installation 'manual' for Mac OSX 10.6 x86_64

Beware, this man is really quick and dirty, more like a log on what I did to get mySQL running on my MacLaptop?. Feel free to update and create a decent manual!

  • Download MySQL from the community server at http://dev.mysql.com/downloads/mysql/
  • Check the installation manual at http://dev.mysql.com/doc/refman/5.1/en/macosx-installation-pkg.html
    • The Preference Pane is optional
    • Double click the .pkg to start
    • Note from the README: "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. We have reported this bug to Apple and it is investigating this problem."
    • MySQL should be installed as follows:
DirectoryContents of Directory
binClient programs and the mysqld server
dataLog files, databases
docsManual in Info format
includeInclude (header) files
libLibraries
manUnix manual pages
mysql-testMySQL test suite
scriptsmysql_install_db
shareMiscellaneous support files, including error messages, sample configuration files, SQL for database installation
sql-benchBenchmarks
support-filesScripts and sample configuration files
/tmp/mysql.sockLocation of the MySQL Unix socket
  • Once the installation is complete, we get to the postinstallation setup en testing (at http://dev.mysql.com/doc/refman/5.1/en/postinstallation.html).
    • you can find mysql in /usr/local/mysql (this is the BASEDIR the manual mentiones), which is actually a link to /usr/local/mysql-version.
    • these directories and files are owned by root and this needs to change
      • cd /usr/local/mysql; sudo chown -R mysql:mysql ./
    • sudo ./bin/mysqld_safe --user=mysql & to start the server as non-privileged user (& in the background), this is the desired way of starting the server for Unix systems
    • ./bin/mysql test login to the test database to test if it runs OK
      • it doesn't run OK? It did for me, so I've no idea.
    • IMPORTANT adjust the root password! Major security issue if you don't!
      • .//bin/mysqladmin -u root password new_password_here
      • in case you wish to change the password: .//bin/mysqladmin -u root -p password new_password_here, you'll be prompted for your old password.
      • needless to say, remember it...
    • add mysql to your PATH. Add export PATH=/usr/local/mysql/bin:$PATH to ~/.profile or ~/.bash_profile. Create one of those (doesn't matter which) if you have neither.
    • check if you can shut down and restart the server ./bin/mysqladmin -u root shutdown and ./bin/mysqld_safe --user=mysql &
Last modified 14 years ago Last modified on 2011-03-31T15:02:18+02:00