After the latest version of Mysql 5.7 and above is installed, the service fails to start and the login fails to solve

The new version of Mysql 5.7 or above fails to start.
Reason : The data folder is missing in the installation directory.
Solution: Enter the installation directory in the doc window and execute mysqld –initialize in the installation root directory


. In the future, the password will be randomly generated and the first login will fail.

At this time we can log in to the database by skipping the verification
. The specific operations are as follows


⦁ Close the mysql server net stop mysql
⦁ Execute the mysqld –skip-grant-tables command in the bin directory to execute Do not close the window without any prompt after the statement is executed
⦁ Re-open a doc window as an administrator and enter the bin directory of
mysql ⦁ Execute the mysql -u root statement to log in After the
difficulty , we have a great task. Give me a thumbs
up thumbs up time
5
4
3
2
1
If you see this well, it means that you are a patient person. You should praise me whether you give me a thumbs up or not.

Back to the topic: Next, we need to set our Execute update mysql.user set authentication_string=

password ('root') where user='root' and Host = 'localhost';
QueryOK,…………………….The words indicate that the statement was executed successfully. This is not over, then we have to hit the door;
update: execute the flush privileges; statement After the

update , we can try to exit mysql first, it will not exit, blame me;

log in with a new password and

see welcome to the MySQL monitor full Full [size=medium][size=small][size=x-small][size=xx-small] [/size][/size][/size][/size]Is there any sense of achievement? You can not read it? ? Blame me. . .
Thank you for reading. If you think this article is helpful, please give me a like (like) if you are not enough, please forgive me and I will work harder!

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326391782&siteId=291194637