初始密码为空,使用空密码登陆mysql执行下列语句
找到如下代码:
?
1
2
3
4
5
$cfg[Servers][$i][auth_type] = config;
$cfg[Servers][$i][user] = root;
$cfg[Servers][$i][password] = ;
$cfg[Servers][$i][extension] = mysql;
$cfg[Servers][$i][AllowNoPassword] = true;
修改为:
?
1
2
3
4
5
$cfg[Servers][$i][auth_type] = config;
$cfg[Servers][$i][user] = root;
$cfg[Servers][$i][password] = root;
$cfg[Servers][$i][extension] = mysql;
$cfg[Servers][$i][AllowNoPassword] = true;
以上所述是小编给大家分享的Linux下忘记mysql密码该如何修改mysql密码的相关内容,希望对大家有所帮助。