Home >Database >Mysql Tutorial >What should I do if I cannot log in locally after modifying mysql permissions?

What should I do if I cannot log in locally after modifying mysql permissions?

王林
王林Original
2020-09-02 14:24:222177browse

Solution to the problem of being unable to log in locally after modifying mysql permissions: First execute the [service mysql stop] command to shut down the mysql service; then execute the [mysqld_safe --skip-grant-tables &] command to skip the permission tables; finally restart Just set a password.

What should I do if I cannot log in locally after modifying mysql permissions?

Solution:

(Learning video recommendation: mysql video tutorial)

Stop first mysql service

service mysql stop

Then skip the permission table

Execute the command:

(Related recommendations:mysql tutorial)

mysqld_safe --skip-grant-tables &

This way It won't prevent us from logging in.

Finally reset the password.

The above is the detailed content of What should I do if I cannot log in locally after modifying mysql permissions?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn