Alex Rivera | Logout

Getting MySQL working on OSX 10.7 Lion

Asked 2011-06-11T17:59:03.713
47

I'm currently trying to get MySQL working on OSX 10.7 Lion. I tried the brew way:

brew install mysql
-> cmake        -> no problems
-> make         -> no problems
-> make install -> no problems
-> done

unset TMPDIR
mysql_install_db --verbose --user=`whoami` --basedir="$(brew --prefix mysql)" --datadir=/usr/local/var/mysql --tmpdir=/tmp
Installing MySQL system tables...
/usr/local/bin/mysql_install_db: line 428: 15397 Done                    { echo "use mysql;"; cat $create_system_tables $fill_system_tables; }
 15398 Done(141)               | eval "$filter_cmd_line"
 15401 Segmentation fault: 11  | $mysqld_install_cmd_line > /dev/null
Installation of system tables failed!  Examine the logs in
/usr/local/var/mysql for more information.

Did anyone get mysql to run on Lion?

Edit
Report

3 Answers

86

You can download a MySQL installer as a DMG file, complete with an installer, system preferences pane and a startup script directly from MySQL. Go to MySQL's community server download page, select Mac OS X as the platform and pick the DMG file.

You can skip the registration form (there a little link under the signup form) and you should be on your way.

Once the file is downloaded, double-click on the DMG, launch the installer and complete the installation. After that, install the startup script using its installer and finally the preferences pane by double-clicking on it. I highly recommend choosing to install it for all users on the computer.

You'll find this way much easier than compiling from source.

You should check out Sequel Pro if you need a great OS X tool to manage your MySQL databases.

answered 2011-06-12T05:34:01.020
0

All,

I was having issues with connecting to my DB through Tomcat, yet could through the MySql tool. Tomcat was accessing it through the actual IP of my machine (10.0.x.x) instead of through localhost or 127.0.0.1. Turns out that when I migrated from SL to Lion, remote connections were disabled. Once I enabled them, it worked fine.

Hopefully this helps someone.

answered 2011-09-20T19:22:49.487
0

I had MySQL installed already, but after upgrading to Lion it would no longer start.

I tried installing the latest official version and it still wouldn't start.

Finally, this fixed it:

$ sudo mkdir /var/log/mysql
$ sudo chown mysql:mysql /var/log/mysql
answered 2012-04-25T21:08:39.630

Your Answer