This article introduces how to install and uninstall Mysql5.7.11 on Mac. This article is very detailed and has reference value. if you are interested, please study it together.
How to install and uninstall Mysql5.7.11 on Mac _ MySQL
Install
Go to the http://www.mysql.com/downloads/, select MySQL Community Edition at the bottom, click download of MySQL Community Server to download the DGM Archive version.
After the download, we found that there was only one dmg main file. it seems that there were multiple installation files in versions earlier than 5.7.
Open this file and install it gradually. Note that a prompt box will pop up when the file is successfully installed. give a temporary password. remember it, remember it, and remember it !!!! If not, please view notifications right on the desktop.
After the installation is successful, locate mysql in the last line of preference settings and start mysql (select start ).
Modify the temporary password as follows:
Open terminal. mysql usually has a local directory by default. Therefore, enter
Cd/usr/local/mysql/bin/
Run the following command:
./mysqladmin –u root –p password
Then you will be prompted to enter the password and your temporary password. after the password is successful, you will be asked to enter the new password. the following code will appear:
New password:Confirm new password:
Then Since password will be sent to server in plain text appears, use ssl connection to ensure password safety. This indicates that the modification has been successful.
Then use the new password to log on to mysql,
cd /usr/local/mysql/bin/ ./mysqladmin –u root –p
Enter the new password!
Uninstall !!!
Various problems occurred during the installation process, which led to repeated installation and eventually a mess. Later, I learned that to install new mysql, I need to delete the previous mysql, and I cannot leave any file. So I found the complete code from the Internet and kept it here.
Infringement deletion ~~~ Even good children who follow the law
Sudo rm/usr/local/mysqlsudo rm-rf/usr/local/mysql * sudo rm-rf/Library/StartupItems/MySQLCOMsudo rm-rf/Library/PreferencePanes/My * rm- rf ~ /Library/PreferencePanes/My * sudo rm-rf/Library/Receipts/mysql * sudo rm-rf/Library/Receipts/MySQL * sudo rm-rf/var/db/receipts/ com. mysql. call vim/etc/hostconfig to delete MYSQLCOM =-YES.
Tips: It seems that I have not deleted it. Therefore, enter/usr/local Under The finder-Go-gotofolder to check whether there are duplicate mysql files. If yes, delete them completely.
By the way, after the download, there will be a mysql folder with the name of your downloaded version and a Mysql shortcut in the local directory. We call this shortcut.
The above is how to install and uninstall Mysql5.7.11 on Mac _ MySQL content. For more information, see PHP Chinese network (www.php1.cn )!