A. Download MySQL
Access to MySQL official website http://www.mysql.com/downloads/ then the page will see "MySQL Community Server" have below a "download" Click.
pic1
into the MySQL download interface ( http://www.mysql.com/downloads/mysql/ ), if you are using a Mac OS to access, then it will default to your chosen the Mac OS X platform, and the following list MySQL version is usable on the Mac OS, if it is used in other platforms, the drop-down list "select platform" option selected just fine.
MySQL version on Mac OS lot, which according to platform, such as 10.5 / 10.6 and other platforms, then there are 32-bit and 64-bit, and that you be selected in accordance with the situation of their own system, then that file extension there were .tar.gz and .dmg, where I chose the .dmg. Click to download the right side to download.
Direct mounting point next step will be until completion.
After installation is complete, configure the environment variables
✨ At this point we enter the time we enter the mysql -uroot -p command line prompt will not commod not found in the terminal, we also need to mysql join the system environment variables.
(1) Go to / usr / local / mysql / bin, if there mysql under view this directory, see pic7.
(2) Execute vim ~ / .bash_profile
Add the directory mysql / bin in this document, see pic8:
PATH=$PATH:/usr/local/mysql/bin
After the addition is complete, press esc, and then enter wq save.
Finally, the input source ~ / .bash_profile command line