MySQL Error: Workaround for error 1045 (28000)

Source: Internet
Author: User

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)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.