zoukankan      html  css  js  c++  java
  • MySQL出错:ERROR 1045 (28000)的解决方法

    MySQL突然不能用了,症状如下:

    [root@bogon ok]# mysql
    ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
    [root@bogon ok]# mysql
    -uroot -p Enter password: ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
    [root@bogon ok]#
    /etc/init.d/httpd start 正在启动 httpd:
    [root@bogon ok]#
    /etc/init.d/mysqld restart 停止 mysqld: [确定] 正在启动 mysqld: [确定]
    [root@bogon ok]# mysql ERROR
    1045 (28000): Access denied for user 'root'@'localhost' (using password: NO) [root@bogon ok]# mysql -uroot -p Enter password: ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
    解决方法:重改密码 [root@bogon ok]# /etc/init.d/mysqld stop 停止 mysqld: [确定]
    [root@bogon ok]# mysqld_safe
    --user=mysql --skip-grant-tables --skip-networking & [1] 10354 [root@bogon ok]# 150404 16:46:14 mysqld_safe Logging to '/var/log/mysqld.log'. 150404 16:46:14 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql [root@bogon ok]# mysql -u root mysql Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A 。。。。。。。 Type 'help;' or 'h' for help. Type 'c' to clear the current input statement. mysql>

    [root@bogon ok]# mysql -u root -p
    Enter password:

    mysql>

    问题解决。

  • 相关阅读:
    HTTPS证书撤销
    前端跨域问题解析
    js递归遍历key
    阿里云centos配置nginx和nodejs
    Linux 查看服务器配置
    解决IPOD NANO7无法开机
    GIF添加3D加速
    关于bootstrap Modal弹窗 滚动条的问题
    Just-In-Time Debugging in Visual Studio 禁止VS在服务器上调试
    利用ASP.NET操作IIS (可以制作安装程序)
  • 原文地址:https://www.cnblogs.com/chinas/p/4393555.html
Copyright © 2011-2022 走看看