Preface This article mainly introduces the relevant solutions for forgetting the password when installing MySQL on Linux/Mac. It is shared for your reference. Let’s take a look at the detailed introduction. Use equipment Computer: Linux or like-Linux OS mysql version: 5.7+ Problem Description After the installation is complete, you cannot connect to the database through the command Solution Generally, the MySQL server installed through DMG is installed in By going into that directory and then # If mysql is running, shut down the mysql service $ sudo lsof -i:3306 $ sudo kill -9 mysql-pid # Enable mysql safe mode $ sudo ./mysqld_safe --skip-grant-tables # Enter mysql shell $ sudo ./mysql -u root # Modify the root user password in the mysql.user table $ update mysql.user set authentication_string=PASSWORD('you password') where User='root'; # The modification is complete here. Afterword After the modification, if you use navicat to connect to the database, you will be prompted to change the password. Just re-enter the password. Because the password modified through safe mode is still marked as expired, so modify it again. Summarize The above is the full content of this article. There are still many shortcomings in this article. I hope that the content of this article will have certain reference learning value for everyone’s study or work. If you have any questions, you can leave a message to communicate. Thank you for your support for 123WORDPRESS.COM. You may also be interested in:
|
<<: VMware Tools installation and configuration tutorial for Ubuntu
>>: Control the light switch with js
Table of contents $nextTick() $forceUpdate() $set...
Table of contents 1. What is a regular expression...
In a project, you often need to use environment v...
Preface I believe that in the process of mobile t...
Report an error The Apache\Nginx service started ...
Elastic stack, commonly known as ELK stack, is a ...
Table of contents 1. What is a closure? 2. The ro...
For historical reasons, MySQL replication is base...
Introduction to Text Shadows In CSS , use the tex...
Table of contents Preface 1. unknown vs any 2. Th...
1. A static page means that there are only HTML ta...
Table of contents js deep copy Data storage metho...
question: The following error occurred when insta...
Table of contents Preface 1. Null coalescing oper...
HTTP Header Explanation 1. Accept: Tells the web s...