= MySQL 5.0.67_1 setup on OS X = == Clean Install 2009-03-21 == $ sudo port install mysql5 [client only] $ sudo port install mysql5 +server $ sudo launchctl load -w /Library/LaunchDaemons/org.macports.mysql5.plist $ sudo -u mysql mysql_install_db5 $ mysql_config5 --socket /opt/local/var/run/mysql5/mysqld.sock # /opt/local/var/run/mysql5/ was empty except for .turd_mysql5 until after... $ shutdown -r now $ cd /opt/local/bin/ $ cd /var $ sudo ln -s /opt/local/var/run/mysql5/mysqld.sock /tmp/mysql.sock $ sudo mkdir /var/mysql $ sudo ln -s /opt/local/var/run/mysql5/mysqld.sock /var/mysql/mysql.sock $ ./mysqladmin5 -u root password 'FireBrand69' $ ./mysqladmin5 -u root -h Silver-Surfer.local password 'FireBrand69' To start mysqld at boot time you have to copy support-files/mysql.server to the right place for your system /opt/local/lib/mysql5/bin/ /opt/local/lib/mysql5/bin/ You can start the MySQL daemon with: cd /opt/local ; /opt/local/lib/mysql5/bin/mysqld_safe & sudo /opt/local/lib/mysql5/bin/mysqld_safe & sudo launchctl load -w /Library/LaunchDaemons/org.macports.mysql5.plist You can test the MySQL daemon with mysql-test-run.pl cd mysql-test ; perl mysql-test-run.pl Please report any problems with the /opt/local/lib/mysql5/bin/mysqlbug script! == Clean Install 2009-01-12 == sudo port install mysql5 [client only] sudo port install mysql5 +server sudo launchctl load -w /Library/LaunchDaemons/org.macports.mysql5.plist sudo -u mysql mysql_install_db5 == Initial Install == sudo port install mysql5 [client only?] sudo port install mysql5 +server sudo launchctl load -w /Library/LaunchDaemons/org.macports.mysql5.plist sudo -u mysql mysql_install_db5 sudo port uninstall mysql5 @5.0.67_1+server sudo port uninstall mysql5 @5.0.67_1 == Clean Install == === Install === sudo port install mysql5 +server === Launch MySQL === sudo launchctl load -w /Library/LaunchDaemons/org.macports.mysql5.plist === Run MySQL Install Setup === sudo -u mysql mysql_install_db5 === Set Root Password === /opt/local/lib/mysql5/bin/mysqladmin -u root password 'ImpLock' /opt/local/lib/mysql5/bin/mysqladmin -u root -h localhost password 'ImpLock' /opt/local/lib/mysql5/bin/mysqladmin -u root -h Silver-Surfer.local password 'ImpLock' === Setup Sockets === mysql_config5 --socket /opt/local/var/run/mysql5/mysqld.sock sudo ln -s /opt/local/var/run/mysql5/mysqld.sock /tmp/mysql.sock sudo mkdir /var/mysql sudo ln -s /opt/local/var/run/mysql5/mysqld.sock /var/mysql/mysql.sock === Shutdown MySQL === sudo launchctl unload -w /Library/LaunchDaemons/org.macports.mysql5.plist === Login to MySQL === mysql5 -u root -p == phpMyAdmin Install == vi /private/etc/httpd.conf # phpMyAdmin Setup Alias /phpmyadmin /Library/WebServer/phpMyAdmin-3.1.0-english AllowOverride None Options None Order allow,deny Allow from all cd /Library/WebServer/phpMyAdmin-3.1.0-english mkdir config sudo chown _www config