Mac How to install and uninstall Mysql5.7.11

  • 2020-12-19 21:13:38
  • OfStack

The installation

To http: / / www. mysql. com/downloads, select the bottom MySQL Community Edition, click MySQL Community Server download, download DGM Archive version.

After downloading it, I found that there was only one dmg master file. It seems that there will be multiple installation files in the version before 5.7.

Click on this file, step by step installation, pay attention to the success of the pop-up prompt box, give a temporary password, 1 must remember, 1 must remember!! If not, scroll to the right of the desktop to see notifications.

After successful installation, go to the last line of preferences to mysql and start mysql (select start).

Here's how to change your temporary password:

Open terminal. General mysql will default to local, so type

cd /usr/local/mysql/bin/

Execute the following command:

./mysqladmin u root p password

Then you will be prompted for your password. Enter your temporary password. After success, you will be asked for a new password

New password:

Confirm new password:

Then you have Since password will be server server plain text, use ssl to ensure password safety. This means it has been modified successfully.

Then use the new password to log in to mysql,

cd /usr/local/mysql/bin/

. / mysqladmin � u root � p

Then just type in your new password!

Uninstall!!

A variety of problems occurred during the installation process, causing me to repeat the installation several times, and finally a mess. Later I learned that the previous mysql should be deleted to install the new one, and not a single file could be left. So I found the whole code on the Internet, and I'll keep it here.

I am a good boy who abides by 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 and delete the line MYSQLCOM= -YES -.

Tips: I don't seem to have deleted it completely, so enter /usr/local under ES159en-ES160en-ES161en to see if there are any duplicate mysql files. If there are any, delete them completely.

By the way, after downloading local, there will be an mysql folder with the name of the version you downloaded and an Mysql shortcut, which we call.


Related articles: