xampp中修改mysql默认空密码(root密码)的方法

首先说明下mysql用户的相关信息是保存在mysql数据库的user表中的,并且该表的密码字段(Password)是通过PASSWORD方法加密存储的。
明白了以上提示,那么修改密码就简单了,选中mysql然后直接运行如下SQL语句即可(这里将密码修改为e23456t):
UPDATE user SET password=PASSWORD(‘e23456t’) WHERE user=’root’;
920
重启后
928
出现无法登陆
924
输入localhost/phpMyadmin要进行如下操作:
打开phpMyAdmin的根目录: 前往XAMPP/ xamppfiles/phpmyadmin在这个目录中找到 “config.inc.php”
找到phpMyadmin的配置文件,即phpMyAdmin目录下的config.inc.php,找到如下代码:
/* Authentication type and info */ $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;
/* Authentication type and info */ $cfg[‘Servers’][$i][‘auth_type’] = ‘config’; $cfg[‘Servers’][$i][‘user’] = ‘root’; $cfg[‘Servers’][$i][‘password’] = ‘e23456t’; $cfg[‘Servers’][$i][‘extension’] = ‘mysql’; $cfg[‘Servers’][$i][‘AllowNoPassword’] = true;
本文有网推老杨原创,转载请保留出处,保护版权人人有责

标签

发表评论

在线客服
网推老杨
微信搜索“网推老杨(wangtuilaoyang)”。关注公众号「网推老杨」获取更多资源和快速找到老杨。
2024-07-16 21:35:19
您好!欢迎访问网推老杨博客,有什么需要帮助吗?点击下下方聊天工具开始咨询。
您的工单我们已经收到,我们将会尽快跟您联系!
[网推老杨QQ]
1589023666
扫码添加网推老杨微信
[工作日拨打]
02968891172
[投稿给老杨]
tuifa666@qq.com
取消

选择聊天工具: