zoukankan      html  css  js  c++  java
  • [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! 

  • 相关阅读:
    快速排序 c++
    编程作业: 感性接触计算机程序
    SAS批量导出sas7bdata至excel
    JetBrains WebStorm 快捷键失效
    grails 解决emoji标签存入mysql
    Groovy使用List集合
    javascript 获取当前部署项目路径
    Groovy基本类型与运算符
    HTML— 弹出遮盖层
    grails 获取domainClassName
  • 原文地址:https://www.cnblogs.com/davidhhuan/p/2508692.html
Copyright © 2011-2022 走看看