MySQL under Mac OS/X 10.5

Time to install MySQL on my new MacBook.

$ cd /opt
$ wget http://dev.mysql.com/get/Downloads/MySQL-5.0/mysql-5.0.45-osx10.4-i686.tar.gz/from/http://mysql.mirrors.hoobly.com/
$ tar xvfz mysql-5.0.45-osx10.4-i686.tar.gz
$ cd mysql-5.0.45-ox10.4-i686
$ scripts/mysql_install_db
Installing MySQL system tables...
071129 22:10:48 [Warning] Setting lower_case_table_names=2 because file system for /opt/mysql-5.0.45-osx10.4-i686/data/ is case insensitive
OK
Filling help tables...
071129 22:10:48 [Warning] Setting lower_case_table_names=2 because file system for /opt/mysql-5.0.45-osx10.4-i686/data/ is case insensitive
OK

bin/mysqld_safe &
[1] 239
macbook:mysql-5.0.45-osx10.4-i686 rbradfor$ chown: /opt/mysql-5.0.45-osx10.4-i686/data/macbook.err: Operation not permitted
Starting mysqld daemon with databases from /opt/mysql-5.0.45-osx10.4-i686/data


$ bin/mysqladmin -uroot password 'sakila'
$ bin/mysql -uroot -psakila -e "SELECT VERSION()"
$ bin/mysqladmin -uroot -psakila shutdown


It was interesting that these normal steps under Linux provided two errors not normally seen.

1. Setting lower_case_table_names=2 because file system for /opt/mysql-5.0.45-osx10.4-i686/data/ is case insensitive

2. chown: /opt/mysql-5.0.45-osx10.4-i686/data/macbook.err: Operation not permitted

The first is interesting, is Mac like Windows in that sense? I’ll need to check that out.
The second occurs every time I start MySQL which is also intriguing, but for now doesn’t affect MySQL operation. It’s interesting that the permissions of the error file is the same as the user running it, so go figure.

Comments

  1. says

    Yep, the Mac OS X filesystem (HFS+) Is case preserving, but case insensitive – causes a few funny little gotchas on the unix side every now and again.

    Linc

  2. says

    Actually, a Mac OS X disk can be formatted as HFS+ with or without case sensitivity (case insensitive is the default) as well as UFS, and hopefully soon (please Steve) ZFS. Apple generally recommends the default though.

    As for the chown error – are you starting mysqld as root?

  3. says

    HFS+ is case-insensitive by default. But do NOT be tempted to reformat your macbook (or at least your boot drive) to be case-sensitive. OS X works fine, but many apps blow up. They try to load shared libraries (components) with wrong case names, etc. It’s a big mess.

    The chown is probably not run as root.

    Finally, you’re now running a 32-bit binary on a 64-bit box. Not optimal. MySQL does not provide 64-bit Intel binaries for OS X. I was able to build a 64-bit version, so it’s just a build/packaging thing and not a technical problem.

  4. Eric says

    How is MySQL running on your MacBook? The MySQL forums indicate that Leopard & MySQL don’t work well together. Your PlanetMySQL post was the only promising resource I could find.