xampp修改MySQL密码

来源:互联网 发布:淘宝首页制作教程 编辑:程序博客网 时间:2024/05/07 16:32

装好xampp之后,默认MySQL数据库密码为空。此时修改该密码,只需要一下几个步骤:

1、使用phpmyadmin

使用phpmyadmin,进入名为mysql的数据库中,执行语句:

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

2、修改phpmyadmin的配置文件

打开配置文件config.inc.php,修改该文件如下:

/* Authentication type and info */$cfg['Servers'][$i]['auth_type'] = 'config';$cfg['Servers'][$i]['user'] = 'root';$cfg['Servers'][$i]['password'] = 'new_password';$cfg['Servers'][$i]['extension'] = 'mysql';$cfg['Servers'][$i]['AllowNoPassword'] = true;


0 0