Wamp5出现#1045 - Access denied for user 'root'@'localhost' (using password: NO)
来源:互联网 发布:基恩士视觉软件 编辑:程序博客网 时间:2024/05/23 18:15
亲测可行!
phpMyAdmin 尝试连接到 MySQL 服务器,但服务器拒绝连接。您应该检查配置文件中的主机、用户名和密码,并确认这些信息与 MySQL 服务器管理员所给出的信息一致。
发现需要用户名和密码,问题来了,安装wampserver时并没有要求我设置用户名和密码啊。很多网友说用户名是root,密码为空。这一点可以通过重装wampserver试试,我懒得去试了。根据提示可以知道,要想访问MySQL,需要对暗号(phpMyAdmin与MySQL之间),因此需要设置phpMyAdmin和MySQL,让他们的用户名和密码是一致的。
首先重置MySQL的密码,用户名就不用重置了,默认的的确是root。方法如下(windows操作系统):
*打开命令行窗口,直接输入命令行
net start
查看目前机器提供的服务,看是否正在运行mysql或wampmysqld(wampserver2.2c是这个)。
如果正在运行mysql或wampmysqld,停止mysql或wampmysqld服务:
Net stop mysql或net stop wampmysqld
启动mysql,一般到mysql的安装路径,找到 mysqld-nt.exe(没有这个就用mysqld.exe) ,输入命令行:
mysqld-nt --skip-grant-tables 或mysqld --skip-grant-tables
当前窗口将会停止。
另外打开一个命令行窗口,执行mysql 如果提示没有这个命令,先进入MySQL的安装位置下bin目录再运行mysql
>use mysql
>update user set password=password("new_password") where user="root";
>flush privileges;
>exit
注意分号。打开任务管理器,找到mysqld-nt(或mysqld)的进程杀掉它,再重新启动mysql-nt(或mysqld)服务,就可以用新密码登录了。
接着修改phpMyAdmin的配置,找到config.inc.php(实例目录:D:\wamp\apps\phpmyadmin3.4.9)文件设置如下:
$cfg['Servers'][$i]['password']
$cfg['Servers'][$i]['password']
重启wampserver,此时phpmyadmin可以连接mysql成功。大功告成了。
- Wamp5出现#1045 - Access denied for user 'root'@'localhost' (using password: NO)
- Wamp5出现#1045 - Access denied for user 'root'@'localhost' (using password: NO)
- Wamp5出现#1045 - Access denied for user 'root'@'localhost' (using password: NO)
- #1045 - Access denied for user 'root'@'localhost' (using password: NO)
- #1045 - Access denied for user 'root'@'localhost' (using password: NO)
- #1045 -Access denied for user 'root'@'localhost' (using password: NO)
- #1045 - Access denied for user 'root'@'localhost' (using password: NO)
- window下的mysq出现1045(28000) Access Denied for user 'root'@'localhost' (Using password:NO)
- Access denied for user 'root'@'localhost' (using password: NO)
- Access denied for user 'root'@'localhost' (using password: NO)
- Access denied for user 'root'@'localhost' (using password: NO)
- error: 'Access denied for user 'root'@'localhost' (using password: NO)'
- Access denied for user 'root'@'localhost' (using password: no)
- Access denied for user 'root'@'localhost' (using password: NO)
- Access denied for user 'root'@'localhost' (using password: NO)解决方法
- Access denied for user 'root'@'localhost' (using password: NO)
- Access denied for user 'root'@'localhost' (using password: NO)
- Access denied for user 'root'@'localhost' (using password: NO)
- oracle中如何将数据库中的数据导出并导入一个台oracle中
- Android 计算宽高
- scala常用语法之控制结构
- Mysql Cluster7.4.12分布式集群搭建
- nc设定tnsping超时
- Wamp5出现#1045 - Access denied for user 'root'@'localhost' (using password: NO)
- linux下安装源码包
- c语言性能优化—使用寄存器变量
- mvc与音频播放
- Scala语言与Play框架入门教程
- NSOperation学习笔记
- 用户管理
- 使vim编辑器显示行号
- hdu1007最近点对(分治)