Agnus Dei (jackal) wrote,
Agnus Dei

Install MySQL Using MacPorts for MacOS X

Install MySQL Using MacPorts

1- Install MacPorts

2- Update MacPorts:
sudo port selfupdate

3- Install MySQL server and client binaries:
sudo port install mysql55

4- Install MySQL server startup scripts:
sudo port install mysql55-server

5- Initialize the Database:
sudo /opt/local/lib/mysql55/bin/mysql_install_db --user=mysql

6- Start MySQL:
sudo /opt/local/share/mysql55/support-files/mysql.server start

7- Set root password:
/opt/local/lib/mysql55/bin/mysqladmin -u root password 'changepasswordhere'

8- Enable the startup script so mysql starts on boot
sudo launchctl load -w /Library/LaunchDaemons/org.macports.mysql55-server.plist
– or --
sudo port load mysql55-server

9- If you need to uninstall/reinstall for whatever reason, remove the database directory when you do the uninstall
sudo port uninstall mysql55-server
cd /opt/local/var/db/
sudo rm -rf mysql55/

10- To check the contents of any package:
sudo port contents <package_name>

  • Post a new comment


    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened