flushprivileges;mysql>quit;修改/opt/lampp/phpmyadmin/config.inc.php找到如下代码:$cfg['servers'][$"/> flushprivileges;mysql>quit;修改/opt/lampp/phpmyadmin/config.inc.php找到如下代码:$cfg['servers'][$">
初始密码为空,使用空密码登陆mysql执行下列语句
mysql>use mysql; mysql> update user set password=password("root") where user='root'; mysql> flush privileges; mysql> quit; 修改/opt/lampp/phpmyadmin/config.inc.php
找到如下代码:
$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;
修改为:
$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密码怎么办的详细内容。更多信息请关注PHP中文网其他相关文章!