Home  >  Article  >  Database  >  mariadb和mysql忘记密码怎么办_MySQL

mariadb和mysql忘记密码怎么办_MySQL

WBOY
WBOYOriginal
2016-06-01 13:08:21958browse

MariaDB

linux环境中:/etc/my.cnf

在[mysqld]配置段添加如下一行:
skip-grant-tables

保存退出编辑。
update user set password=PASSWORD("123456") where user='root';

flush privileges

密码已经改好了。
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