MAC Mysql Reset Password

Source: Internet
Author: User
Tags mysql login

With a Mac computer, you need to reset your password when the MySQL login password is forgotten. The steps are as follows:

1. Close the currently running MySQL process.

A. Go to Preferences, select MySQL, and then choose "Stop MySQL server";

Or

B. You can use Activity Monitor (F4 go to select "Other", then "Activity Monitor") and then close the mysqld process

2. Open terminal, switch to root user: Su root

3. Go to MySQL installation directory: Cd/usr/local/mysql/bin

4. Run the command:./mysqld_safe--skip-grant-tables

5. Open a new terminal, switch to root user: Su root, enter directory: Cd/usr/local/mysql/bin

6. Open MySQL:./mysql

7. Get permission: Flush privileges;

7. Modify the root account password: Set password for ' root ' @ ' localhost ' =password (' new password ');

Modified successfully!

MAC Mysql Reset Password

Related Article

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.