169 | | Once you have done at least one of the two previous commands, you can then set up the main database like this: |
| 169 | Once you have done at least one of the two previous commands, then how to set up the main database depends on the version of OS X you're using. |
| 170 | |
| 171 | For '''OS X 10.5 and above''', set up the main database like this: |
| 172 | {{{ |
| 173 | sudo -u _mysql mysql_install_db5 |
| 174 | sudo chown -R _mysql:_mysql /opt/local/var/db/mysql51/ |
| 175 | sudo chown -R _mysql:_mysql /opt/local/var/run/mysql51/ |
| 176 | sudo chown -R _mysql:_mysql /opt/local/var/log/mysql51/ |
| 177 | }}} |
| 178 | |
| 179 | ''If that fails to work, then try this:'' |
| 180 | {{{ |
| 181 | sudo mysql_install_db5 |
| 182 | sudo chown -R _mysql:_mysql /opt/local/var/db/mysql51/ |
| 183 | sudo chown -R _mysql:_mysql /opt/local/var/run/mysql51/ |
| 184 | }}} |
| 185 | |
| 186 | However, for OS X 10.4 and below, up the main database like this: |
| 187 | |