Mac Install and delete mysql5.7

Source: Internet
Author: User

With regard to msyql5.7, the biggest change during installation is the default password

I'm installing MYSQL-5.7.17-MACOS10.12-X86_64.DMG.

and MYSQL-WORKBENCH-COMMUNITY-6.3.8-OSX-X86_64.DMG

Install MYSQL-5.7.17-MACOS10.12-X86_64.DMG First, step by step, and jump to the last temporary password.

The right notification bar also has (I installed two times, so there are two)

One thing to note here is that when it pops up, don't rush off, copy it and put it in a text.

Because the right notification bar information can not be copied, and this password is more difficult to enter, do not know which input is wrong, I first time is input n times, did not enter the right, and finally installed again.

Change Password

1. Start MySQL

2.

cd/usr/local/mysql/bin/

./mysql-uroot-p

Prompt for password, enter a copy of the temporary password

(If the error has been made here, then use

./mysqld_safe--skip-grant-tables --skip-networking

Reference URL http://blog.csdn.net/ku360517703/article/details/49684809

This method is tried on Linux, but it seems useless under the Mac, still let me enter the password. The official statement is if you lose this password, please consult the sections how to Reset the Root password in the MySQL reference manual, but I haven't seen it yet, I'll forget the password later.

After entering MySQL

mysql> Set password for [email protected] = password (' newpassword ');

Then exit, then try again with the new password.

If the modification succeeds, then the next step

Configure environment variables (This step can be skipped, but then every time MySQL has to enter the/usr/local/mysql/bin/, very troublesome)

For Mac environment variables, refer to this article http://www.cnblogs.com/shineqiujuan/p/4693404.html

I modified the/etc/paths, (-rw-r--r--1 root wheel 1 22:50/etc/paths),

To enter root user modification, Su root (if no root user, first set the root user)

After that, Vi/etc/paths, after entering the editing state, drag the/usr/local/mysql/bin folder in.

After that, save the exit, restart the computer, start the MySQL service, and look at the terminal input mysql-uroot-p.

Delete MySQL

Sometimes MySQL needs to be removed for some reason, such as a configuration file that is wrong and cannot be recovered.

Delete as follows, very troublesome

sudo rm/usr/local/-rf/usr/local/mysql*-rf/library/startupitems/-rf/library/ preferencepanes/my*/etc/hostconfig  (and removed the line mysqlcom=-yes--rf ~/library/ preferencepanes/my*-rf/library/receipts/mysql*-rf/library/receipts/mysql*-rf/  var/db/receipts/com.mysql.*

After you've deleted it, restart your computer and you can reload MySQL.

Mac Install and delete mysql5.7

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.