Mysql错误:Error Nr.1045
问题提示:
Error Nr. 1045
Access denied for user 'root'@'localhost' (Using password: NO)
If a personal firewall is running on your machine, please make sure you have opened the TCP port 3306 for connections. Otherwise no client application can connect to the server. After you have opened the port please press [Retry] to apply the security settings.
If you are re-installing after you just uninstalled the MySQL server please note that the data directory was not removed automatically. Therefore the old password from your last installations is still needed to connect to the server. In this case please select skin now and re-run the Configuration Wizard from the start menu.
问题解决方案:
1再次使用MySQL Installer,什么都不用动,只需要点next, next, next, yes, yes, yes.这样就可以安装,启动Mysql了。
2使用Windows防火墙打开端口。开始-〉控制面板->windows防火墙-〉例外。
3点击“添加端口”按钮:名称:mysql 端口号:3306
4点击“添加程序”按钮:添加Mysql(C:/Programs Files/mysql 5.x.x/bin/mysql.exe )
5如果你愿意,那么重起你的电脑(我就这么做了,以防万一)
6下在Mysql管理员程序:
http://dev.mysql.com或者http://mysql.he.net
7解压缩之后,在解压缩目录中双击MySQL Administrator.exe,启动 "MySQLAdministrator.exe"
Server host: localhost
Username: root
Password: whatever
点击OK
8点击左侧的“Startup Variables”。选中“Disable grant tables”。
9点击左侧的“Service Control”,然后选中“Start/Stop Service”标签。
10点击“Stop Service”--如果服务已经停止了,那么点击这个按钮可以启动服务。
如果你在系统中安装了php,那么我建议你使用phpMyAdmin来维护MySQL。