• [Ubuntu] Access denied for user ‘debiansysmaint’@'localhost’ (using password: YES)


    I have reinstalled my system to Ubuntu 12.04, after installed mysql, i found that there is an error when start mysql: 

    Access denied for user ‘debian-sys-maint’@'localhost’ (using password: YES) 

    After searching the reason via google, i at last found the reason, here is it:

    That’s because debian has a mysql account for switching on/off and checking mysql status, and mysql password for that user “debian-sys-maint” should be the same stored in /etc/mysql/debian.cnf

    here is the way to resolve it.

    1. check the password in /etc/mysql/debian.cnf

    sudo vim /etc/mysql/debian.cnf

    you will see something like these:

    [client]
    host     = localhost
    user     = debian-sys-maint
    password = your-password-here
    socket   = /var/run/mysqld/mysqld.sock
    [mysql_upgrade]
    host     = localhost
    user     = debian-sys-maint
    password = your-password-here
    socket   = /var/run/mysqld/mysqld.sock
    basedir  = /usr 

    2. login to mysql:

    mysql -u root -p

    3. grant the rights to debian-sys-maint

    mysql> GRANT ALL PRIVILEGES ON *.* TO ‘debian-sys-maint’@'localhost’ IDENTIFIED BY ‘your-password-here’ WITH GRANT OPTION;

    Query OK, 0 rows affected (0.00 sec) 

    Done! 

  • 相关阅读:
    position+left+bottom+top+right
    C++中的bool类型
    C++读取ini文件
    菜单中Clean和batch build的作用
    解决连接HIS连接不上数据库的问题
    编译错误ERROR C2027
    C++中枚举类型的作用
    用CTime类得到当前日期 时间
    C++中如何调用DLL文件
    #import "msado15.dll" no_namespace rename("EOF","adoEOF")
  • 原文地址:https://www.cnblogs.com/davidhhuan/p/2508692.html
Copyright © 2020-2023  润新知