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中文網其他相關文章!