Tuesday, October 26, 2010

Uninitialized constant MysqlCompat::MysqlRes

Note: I'm using Mac OS X Version: 10.6.3
 
Open the Terminal.
First removed all mysql gems:
  • gem uninstall mysql
After removing the mysql gem run the following:

sudo env ARCHFLAGS="-arch x86_64" gem install mysql -- --with-mysql-config=/usr/local/mysql/bin/mysql_config

Uninstall MySQL on Mac OS X

NOTE: This will delete all your databases.

Open the Terminal then do the following:

  • sudo rm /usr/local/mysql
  • sudo rm -rf /usr/local/mysql*
  • sudo rm -rf /Library/StartupItems/MySQLCOM
  • sudo rm -rf /Library/PreferencePanes/My*
  • sudo rm -rf ~/Library/PreferencePanes/My*
  • edit /etc/hostconfig and remove the line MYSQLCOM=-YES-
  • sudo rm -rf /Library/Receipts/mysql*
  • sudo rm -rf /Library/Receipts/MySQL*
  • sudo rm -rf /var/db/receipts/com.mysql.*