Installing MySQL on Mac 10.5

Ok - I had to install MySQL on my Mac for the first time - using a tar of the binaries none the less. And it has been interesting. These are notes mostly for myself but if others find them helpful - great.

  1. instructions I used - http://dev.mysql.com/doc/refman/5.0/en/installing-binary.html
  2. to create a group in 10.5 - use dscl. In my case ‘dscl . -create /groups/mysql’
  3. to create a user in 10.5 - again use dscl. ‘dscl .-create /Users/mysql’
  4. I had to make /usr/local with mkdir -m 775
  5. I did not have to decompress things since the Mac did it for me - but I did have to place it in my Library dir and make the ln to it in my /usr/local dir
  6. DO NOT FORGET to give your root user a password and either drop the anonymous user or put a password on it!

Other notables (yes I am a server noob):

  • start the deamon with ’sudo bin/mysqld_safe –user=mysql &’
  • If you forget the ampersand at the end - use cntl+z to escape then use ‘bg’ to put the deamon in the background
  • stop the deamon with ‘bin/mysqladmin -u root shutdown’

Other notes to self on having multiple versions available:

  1. option 1 - have multiple binary installs in their own folders and just change the ln.. or have multiple ln with individual names. since I do not need to have all of them running at one time - I can start and stop the deamons as I need.
  2. option 2 - is provided in the manual at http://dev.mysql.com/doc/refman/5.0/en/multiple-servers.html
del.icio.us:Installing MySQL on Mac 10.5   digg:Installing MySQL on Mac 10.5   furl:Installing MySQL on Mac 10.5   reddit:Installing MySQL on Mac 10.5

WordPress database error: [Table 'wp1_comments' is marked as crashed and last (automatic?) repair failed]
SELECT * FROM wp1_comments WHERE comment_post_ID = '507' AND comment_approved = '1' ORDER BY comment_date

Leave a Reply