Archive for 11月, 2012

macportでmysqlをインストール

by oganosin. 0 Comments

ディレクトリの作成と権限変更は手動で行わないとダメみたいですね。

sudo port install mysql5 +server

sudo mkdir /opt/local/var/db/
sudo mkdir /opt/local/var/db/mysql5
sudo chown mysql /opt/local/var/db/mysql5
sudo chgrp mysql /opt/local/var/db/mysql5
sudo -u mysql mysql_install_db5

sudo mkdir /opt/local/var/run
sudo mkdir /opt/local/var/run/mysql5
sudo chown mysql /opt/local/var/run/mysql5
sudo chgrp mysql /opt/local/var/run/mysql5
sudo /opt/local/share/mysql5/mysql/mysql.server start