Every morning when I check server status,I will find MySQL’s password is changed:
mysql -uuser -ppassword
will report
ERROR 1045 (28000): Access denied for
user ‘user’@’localhost’ (using
password: YES)And then I restart server,and when it’s up,MySQL will be back to normal.
It has now become a routinely job.
What can be the cause for this?
How can I know what’s exactly happening to MySQL?
Here is the error log:
100122 10:11:16 [Note] D:\MySQL\MySQL
Server 5.0\bin\mysqld-nt: Normal
shutdown100122 10:11:16 InnoDB: Starting
shutdown… 100122 10:11:18 InnoDB:
Shutdown completed; log sequence
number 0 22939338 100122 10:11:18
[Note] D:\MySQL\MySQL Server
5.0\bin\mysqld-nt: Shutdown complete100122 10:12:40 InnoDB: Started; log
sequence number 0 22939338 100122
10:12:42 [Note] D:\MySQL\MySQL Server
5.0\bin\mysqld-nt: ready for connections. Version:
‘5.0.24-community-nt’ socket: ”
port: 3306 MySQL Community Edition
(GPL) 100123 16:20:44 [Note]
D:\MySQL\MySQL Server
5.0\bin\mysqld-nt: Normal shutdown100123 16:20:44 InnoDB: Starting
shutdown… 100123 16:20:46 InnoDB:
Shutdown completed; log sequence
number 0 22939832 100123 16:20:46
[Note] D:\MySQL\MySQL Server
5.0\bin\mysqld-nt: Shutdown complete100123 16:22:09 InnoDB: Started; log
sequence number 0 22939832 100123
16:22:11 [Note] D:\MySQL\MySQL Server
5.0\bin\mysqld-nt: ready for connections. Version:
‘5.0.24-community-nt’ socket: ”
port: 3306 MySQL Community Edition
(GPL) 100125 9:18:59 [Note]
D:\MySQL\MySQL Server
5.0\bin\mysqld-nt: Normal shutdown100125 9:18:59 InnoDB: Starting
shutdown… 100125 9:19:00 InnoDB:
Shutdown completed; log sequence
number 0 22941001 100125 9:19:00
[Note] D:\MySQL\MySQL Server
5.0\bin\mysqld-nt: Shutdown complete100125 9:20:22 InnoDB: Started; log
sequence number 0 22941001 100125
9:20:25 [Note] D:\MySQL\MySQL Server
5.0\bin\mysqld-nt: ready for connections. Version:
‘5.0.24-community-nt’ socket: ”
port: 3306 MySQL Community Edition
(GPL)
Answer
Isn’t there supposed to be a space between the -u user?
http://dev.mysql.com/doc/refman/5.0/en/connecting-disconnecting.html
mysql -u user -ppassword
Try that to see, or even better yet, try
mysql -u user -p
When prompted for the password type it in to see if you are getting the same error.
Attribution
Source : Link , Question Author : Community , Answer Author : eric.s