Install and uninstall Mac Mysql5.7.11 and macmysql5.7.11
For beginners, I am confused by the installation of mysql, so I will record it here.
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/mysql
Sudo rm-rf/usr/local/mysql *
Sudo rm-rf/Library/StartupItems/MySQLCOM
Sudo 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.