xampp默认mysql密码设置,修改mysql的默认空密码

1.进入phpmyadmin的mysql数据库,执行如下语句

UPDATE user SET password=PASSWORD('new_password') WHERE user='root';

或者

SET PASSWORD FOR 'root'@'localhost'=PASSWORD('new_password');


2.phpmyadmin中的对应密码配置也要修改,找到配置文件,如我的是:
F:\xampp\phpMyAdmin\config.inc.PHP
找到如下代码$cfg[‘Servers’][$i][‘password’]= ”;

修改为$cfg[‘Servers’][$i][‘password’]= ‘123456’;

发表评论?

0 条评论。

发表评论


注意 - 你可以用以下 HTML tags and attributes:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>