MySQL suddenly failed to use the following symptoms:
[[email protected] ok]# mysqlERROR1045(28000): Access denied forUser'Root'@'localhost'(using Password:no)
[[email protected] OK] # mysql -uroot- PEnter password:error1045(28000): Access denied forUser'Root'@'localhost'(using Password:yes)
[[email protected] OK] # /etc/init.d/ httpd Start is starting httpd:
[[email protected] OK] # /etc/init.d/mysqld Restart stop mysqld: [OK] starting mysqld: [OK]
[Email protected] ok]# Mysqlerror1045(28000): Access denied forUser'Root'@'localhost'(using Password:no) [[email protected] ok]# MySQL-uroot-penter Password:error1045(28000): Access denied forUser'Root'@'localhost'(using Password:yes)
Workaround: Re-change Password [[email protected] ok]#/etc/init.d/mysqld Stop Stop mysqld: [OK]
[Email protected] ok]# Mysqld_safe--user=mysql--skip-grant-tables--skip-networking &[1]10354[email protected] ok]#150404 -: $: -Mysqld_safe Logging to'/var/log/mysqld.log'.150404 -: $: -Mysqld_safe starting mysqld daemon with databases from/var/lib/mysql[[email protected] ok]# MySQL-u root mysqlreading table information forCompletion of table and column namesyou can turn off this feature to get a quicker startup with-A..... Type'Help ;'Or'\h' forHelp. Type'\c'ToClearThe current input statement.mysql>
[Email protected] ok]# mysql-u root-p
Enter Password:
Mysql>
Problem solving.
MySQL Error: Workaround for error 1045 (28000)