After I found that the previous article solved the problem of MySQL service failing to start, I found that I could not log in with the root user without a password. The 5.7 version could not log in with the root user without a password during initialization. After searching many posts, I solved the problem. It turns out that in the .err file in the data file generated by the mysqld –initialize method in the previous article, you can open it with word and there will be a temporary initial password for generating root After opening, find the password: However, this password will expire and cannot be used after being used once. Now let's change this password 1. First shut down the mysql service, net stop mysql 2. Modify your MySQL configuration file my.ini or my-default.int. See which file to modify according to your own configuration. 3. Add skip-grant-tables to the [mysqld] node 4. Start the MySQL service (net start mysql), and use a visual client to enter MySQL. I use the visual client mysqlFront, you can find it on Baidu. 5. Open the user table under MySQL and change the Y in the password_expired field to N. This is mainly to change whether the password is valid. There are two types, Y/N. Y means expired, and n means valid. Remember to save after changing it. 6. Stop the mysql service, delete the skip-grant-tables in the ini file, and restart the service 7. Change password: mysqladmin -u root password root Enter the original password and the change is successful. The last root is the new password The password has been changed successfully and you can log in, mysql -uroot -p Enter the password root you just set to log in The above is the full content of this article. I hope it will be helpful for everyone’s study. I also hope that everyone will support 123WORDPRESS.COM. You may also be interested in:
|
<<: Detailed explanation of installing applications in Linux Centos7 without Internet connection
>>: How to use the Clipboard API in JS
1. Execute the select statement first to generate...
This article example shares the specific code of ...
First of all, the formation of web page style main...
1: Throughput (Requests per second) A quantitativ...
This article example shares the specific code of ...
Sometimes the page is very long and needs an arro...
This article example shares the specific code of ...
MySQL InnoDB monitoring (system layer, database l...
Preface A reverse proxy is a server that receives...
1. Create the tomcat installation path mkdir /usr...
The mysql on a server in the computer room had be...
This article describes various ways to implement ...
background As the number of application systems c...
This article shares MYSQL logs and backup and res...
The question arises This question arose when I wa...