How to install and uninstall Mysql5.7.11 on Mac, macmysql5.7.11

Source: Internet
Author: User
Tags ssl connection

How to install and uninstall Mysql5.7.11 on Mac, macmysql5.7.11

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.

Articles you may be interested in:
  • Install MYSQL on MAC OS X
  • How to install MySQL on Mac
  • How to install the latest MySQL version 5.7.9in mac OS X10.10

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.