环境:window7,tomcat6,!今天部署程序启动的死后突然出现ccess denied for user 'root'@'localhost' (using password)这个错误,开始以为是程序的问题,后面才知道是mysql的问题,可是mysql客户端工具还是能够登录啊 ,我就纳闷了!好了 疑惑不解就不说了!后面我就翻了几篇帖子,找到了:
就是运行了:
1: 到WINDOWS的命令行了(‘DOS’ 下),切换到你的MySQL bin目录下:
mysqld --defaults-file="C:\Program Files\MySQL\MySQL Server 5.1\my.ini" --console --skip-grant-tables;
运行之后看到这样的结果就说明好了:
090515 22:06:09 [Warning] The syntax '--log' is deprecated and will be removed i
n MySQL 7.0. Please use '--general_log'/'--general_log_file' instead.
090515 22:06:09 [Warning] The syntax '--log_slow_queries' is deprecated and will
be removed in MySQL 7.0. Please use '--slow_query_log'/'--slow_query_log_file'
instead.
090515 22:06:09 [Warning] The syntax '--log' is deprecated and will be removed i
n MySQL 7.0. Please use '--general_log'/'--general_log_file' instead.
090515 22:06:09 [Warning] The syntax '--log_slow_queries' is deprecated and will
be removed in MySQL 7.0. Please use '--slow_query_log'/'--slow_query_log_file'
instead.
090515 22:06:09 [ERROR] The update log is no longer supported by MySQL in versio
n 5.0 and above. It is replaced by the binary log. Now starting MySQL with --log
-bin='' instead.
090515 22:06:09 InnoDB: Started; log sequence number 0 324221
090515 22:06:09 [Note] mysqld: ready for connections.
Version: '5.1.33-community-log' socket: '' port: 3306 MySQL Community Server
(GPL)
2:mysql -uroot mysql; (这一步同样需要切换到mysql安装的bin目录下执行
看到这样的记过就说明好了:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.1.33-community-log MySQL Community Server (GPL)
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
好了 感谢帖子中的【ACMAIN_CHM】 注意了
我执行了这两句话,程序也不报那个错误了! 原文地址:http://bbs.csdn.net/topics/310006640
注意原文提问者说的几个解决办法是linux下面的 ,windows下面的解决办法 用户[ACMAIN_CHM]回答了!注意一部一部的来!就写这么多吧