Installing MySQL from DMG on Mac (and the few commands to make it work on the command line)
When you install mysql from the DMG on Mac OS X, it leaves a few things missing. Mysql binaries are missing from the path, and the sock file is being looked for in the wrong place by default.
Here is a quick fix:
1 2 3 | echo "export PATH=/usr/local/mysql/bin:\$PATH" >> ~/.bash_login; sudo mkdir -p /opt/local/var/run/mysql5; sudo ln -s /tmp/mysql.sock /opt/local/var/run/mysql5/mysqld.sock; |
Yay, now you can rock out with your bad self.
Thinking Sphinx cannot find Sphinx
I was getting this error this morning after setting up my new laptop for the project I am working on:
1 2 3 4 5 6 7 8 9 10 11 12 13 | sh: line 1: 326 Trace/BPT trap indexer 2>&1 sh: line 1: 329 Trace/BPT trap /usr/local/bin/indexer 2>&1 Sphinx cannot be found on your system. You may need to configure the following settings in your config/sphinx.yml file: * bin_path * searchd_binary_name * indexer_binary_name For more information, read the documentation: http://freelancing-god.github.com/ts/en/advanced_config.html rake aborted! uninitialized constant MysqlCompat::MysqlRes |
Everyone probably knows this, but I wild-goose-chased trying to figure out if I had a setting wrong in my sphinx.yml file for Thinking Sphinx this morning for like half an hour before I realized what Thinking Sphinx meant about "Sphinx cannot be found on your system." was that the MySQL Development headers weren't installed. I fixed this with a simple port install on Mac.
1 | port install mysql5-devel |
The more you know.