| 1 | = MySQL 5.1 installation 'manual' for Mac OSX 10.6 x86_64 = |
| 2 | |
| 3 | 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! |
| 4 | |
| 5 | * Download MySQL from the community server at http://dev.mysql.com/downloads/mysql/ |
| 6 | * Check the installation manual at http://dev.mysql.com/doc/refman/5.1/en/macosx-installation-pkg.html |
| 7 | * The Preference Pane is optional |
| 8 | * Double click the .pkg to start |
| 9 | * 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." |
| 10 | * MySQL should be installed as follows: |
| 11 | ||'''Directory'''||'''Contents of Directory'''|| |
| 12 | ||bin||Client programs and the mysqld server|| |
| 13 | ||data||Log files, databases|| |
| 14 | ||docs||Manual in Info format|| |
| 15 | ||include||Include (header) files|| |
| 16 | ||lib||Libraries|| |
| 17 | ||man||Unix manual pages|| |
| 18 | ||mysql-test||MySQL test suite|| |
| 19 | ||scripts||mysql_install_db|| |
| 20 | ||share||Miscellaneous support files, including error messages, sample configuration files, SQL for database installation|| |
| 21 | ||sql-bench||Benchmarks|| |
| 22 | ||support-files||Scripts and sample configuration files|| |
| 23 | ||/tmp/mysql.sock||Location of the MySQL Unix socket|| |
| 24 | * 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). |
| 25 | * 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. |
| 26 | * these directories and files are owned by root and this needs to change |
| 27 | - {{{cd /usr/local/mysql; sudo chown -R mysql:mysql ./}}} |
| 28 | * {{{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 |
| 29 | * {{{./bin/mysql test}}} login to the test database to test if it runs OK |
| 30 | - it doesn't run OK? It did for me, so I've no idea. |
| 31 | * IMPORTANT adjust the root password! Major security issue if you don't! |
| 32 | - {{{.//bin/mysqladmin -u root password new_password_here}}} |
| 33 | - 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. |
| 34 | - needless to say, remember it... |
| 35 | * 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. |
| 36 | * check if you can shut down and restart the server {{{./bin/mysqladmin -u root shutdown}}} and {{{./bin/mysqld_safe --user=mysql &}}} |