MySQLのサーバー起動・停止 (Macports)

開始

% sudo /opt/local/share/mysql56/support-files/mysql.server start
% sudo port load mysql56-server
% sudo launchctl load -w /Library/LaunchDaemons/org.macports.mysql56-server.plist

停止

% sudo /opt/local/share/mysql56/support-files/mysql.server stop
% sudo port unload mysql56-server
% sudo launchctl unload -w /Library/LaunchDaemons/org.macports.mysql56-server.plist

// mysql_safe daemonのjob停止
% sudo /opt/local/lib/mysql56/bin/mysqladmin -u root -p shutdown
Enter password:
150924 00:11:56 mysqld_safe mysqld from pid file /opt/local/var/db/mysql56/omac.local.pid ended
[1]  + done       sudo /opt/local/lib/mysql56/bin/mysqld_safe