Have you tried MySQLTuner yet? It's free and it makes optimizing your MySQL server easier than ever!

Installing mysql on FreeBSD from ports is one of the oddest installations I’ve ever completed. Here’s the step by step:

Get it compiled:
# portinstall mysql50-server
-- OR --
# make -C /usr/ports/databases/mysql50-server install clean

Once it’s installed, copy my-small.cnf, my-medium.cnf or my-huge.cnf to /usr/local/etc/my.cnf:
# cp /usr/local/share/mysql/my-small.cnf /usr/local/etc/my.cnf

Enable mysql in the rc.conf:
# echo "mysql_enable=\"YES\"" >> /etc/rc.conf

Install the authentication tables:
# mysql_install_db

Last, change the ownership on MySQL’s data directory:
# chown -R mysql:mysql /var/db/mysql

If you miss the last step, you’ll get something ugly like this:
mysqld started
[ERROR] /usr/local/libexec/mysqld: Can’t find file: ‘./mysql/host.frm’ (errno: 13)
[ERROR] /usr/local/libexec/mysqld: Can’t find file: ‘./mysql/host.frm’ (errno: 13)
[ERROR] Fatal error: Can’t open and lock privilege tables: Can’t find file: ‘./mysql/host.frm’ (errno: 13)
mysqld ended

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • bodytext
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google
  • Reddit
  • Slashdot
  • StumbleUpon
  • Technorati
  • TwitThis
Leave a Reply

You must be logged in to post a comment. Login »