Troubles with macport install in mysql

November 7, 2009 § 1 Comment

I painfully discover there are many outdated blog tutorials on installing mysql. It is difficult to find the most accurate documentation even within the official website.

Outdated command
$sudo port install mysql5 +server

If you did make a mistakes, uninstall mysql5 +server.

$ port uninstall mysql +server

The mysql5 +server package variant in MacPorts is obsolete, and is superseded by the mysql5-server package, which you install in addition to mysql5. This allows you to build it after the fact, instead of re-compiling the entire mysql5 package with +server.

Install both mysql5 and mysql5-server packages. You should find mysql5 plist file in /Library/LaunchDaemons. You should not need to symlink your mysqld.sock to /tmp/mysql.sock.

# Install MySQL
sudo port install mysql5 mysql5-server
sudo -u mysql mysql_install_db5
sudo launchctl load -w /Library/LaunchDaemons/org.macports.mysql5.plist
sudo port install rb-mysql
/opt/local/lib/mysql5/bin/mysqladmin -u root password 'PASSWORD'
sudo gem install mysql -- --with-mysql-config=/opt/local/bin/mysql_config5
# Install Apache
sudo port install apache2
sudo launchctl load -w /Library/LaunchDaemons/org.macports.apache2.plist
sudo /opt/local/apache2/bin/apachectl -k start
sudo /opt/local/apache2/bin/apachectl -k stop
# Install Passenger
sudo gem install passenger
sudo passenger-install-apache2-module
# Extras
sudo port install wget
sudo port install ImageMagick
sudo port install sphinx
sudo gem install capistrano

§ One Response to Troubles with macport install in mysql

  • Elma says:

    Thank u for sharing!

    I had a lot of trouble getting mysql5 to work with the “outdated blog tutorials” For me this was the solution! Nice!

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

What’s this?

You are currently reading Troubles with macport install in mysql at Web Builders.


%d bloggers like this: