Never been to TextSnippets before?

Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world (or not, you can keep them private!)

« Newer Snippets
Older Snippets »
3 total  XML / RSS feed 

MySQL 4 macports setup

If this is a new install
If you did not choose the server variant you may add a mysql user and you will need to change the ownership to that user:
sudo chown mysql /opt/local/var/db/mysql
sudo chown mysql /opt/local/var/run/mysqld
sudo chown mysql /opt/local/var/log/mysql


You might want to run
sudo -u mysql mysql_install_db


You have to symlink mysql to the location on osx

first find out where mysql has put the socket:
mysql_config --socket

Next symlink /tmp/mysql.sock to the right location of the socket
sudo ln -s path-of-mysql.sock-from-above /tmp/mysql.sock


Start MySQL
sudo /opt/local/share/mysql/mysql.server start


Stop MySQL
sudo /opt/local/share/mysql/mysql.server stop

Macports MySQL 5 startup on launch

A startup item has been generated that will aid in starting mysql5 with launchd. It is disabled by default. Execute the following command to start it, and to cause it to launch at startup:
sudo launchctl load -w /Library/LaunchDaemons/org.macports.mysql5.plist


Common macports commands

Installs a package
port install package

uninstalls a package
port uninstall package

shows all ports currently installed
port installed

shows all ports not currently installed, you may want to pipe the output of this command to grep to limit the output
port uninstalled

search for a port whose name matches the regex
port search regex

shows meta information on a package
port info package

shows the latest version of all available ports
port list
« Newer Snippets
Older Snippets »
3 total  XML / RSS feed