您的位置:首页 > 数据库 > MySQL

xampp修改MySQL密码

2016-01-27 12:47 507 查看
装好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;
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: