close

Install MySQL Using MacPorts for MacOS X


Install MySQL Using MacPorts

1- Install MacPorts
http://www.macports.org/install.php

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><package_name>

 

來源:http://jackal.livejournal.com/2160464.html

arrow
arrow
    文章標籤
    macports install mysql
    全站熱搜
    創作者介紹
    創作者 James Wu 的頭像
    James Wu

    James's Privacy Corner

    James Wu 發表在 痞客邦 留言(0) 人氣()