MySQL can be set when it is installed, but it seems that lower versions cannot be set and need to be set after installation. Under mac, mysql5.7.18 connection error, error message: Access denied for user 'root'@'localhost' (using password: YES) The commands in () are entered in the shell. You must enter them in full, including symbols such as ; & Step 1: Apple->System Preferences->Click MySQL at the bottom to turn off the MySQL service Step 2: Enter the terminal and type (cd /usr/local/mysql/bin/) and press Enter Type (sudo su) and press Enter to obtain administrator privileges. Enter (./mysqld_safe --skip-grant-tables &) and press Enter to disable the mysql authentication function. MySQL will automatically restart and the mysql status in the preferences will become running. Step 3: Enter the command (./mysql) and press Enter Enter the command (flush privileges;) Don’t forget to enter the semicolon Enter the command (set password for 'root'@'localhost' = password('root');) The root in password('root') is the new password. You can set it at will. Don't forget to enter the semicolon. At this point, the password has been changed successfully and you can log in normally. Summarize The above is the simple method I introduced to you for setting the password for MySQL version 5.6 on Mac. I hope it will be helpful to you. If you have any questions, please leave me a message and I will reply to you in time! You may also be interested in:
|
<<: Summary of Docker configuration container location and tips
Copy code The code is as follows: <html> &l...
You may already know that the length 1 of int(1) ...
Preface In the development of small programs, we ...
Copy code The code is as follows: <span style=...
1. Online Text Generator BlindTextGenerator: For ...
This article shares the specific code of JavaScri...
Table of contents The relationship between the co...
Turn off ping scanning, although it doesn't h...
When doing database statistics, you often need to...
Preface Recently connected to mysql /usr/local/my...
Why do we need to build a nexus private server? T...
1. <dl> defines a list, <dt> defines ...
GNU Parallel is a shell tool for executing comput...
This article example shares the specific code of ...
Download source code git clone https://github.com...