Mysql不使用密码登录或者重置root密码
Abstract
# 方式一
```shell
vim /etc/my.cnf
```
在`[mysqld]`段后加一行
```
skip-grant-tables
```
重启`mysql`,即可免密登录
```
/etc/init.d/mys
方式一
vim /etc/my.cnf
在[mysqld]段后加一行
skip-grant-tables
重启mysql,即可免密登录
/etc/init.d/mysql restart
service mysql restart
方式二
用这条命令运行Mysql
/usr/bin/mysqld --skip-grant-tables
启动Mysql后重置root密码,上面的mysqld可以使用mysql_safe
Login required to read the rest of the content
登录 to comment~
Guess you like
Recommended articles