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! 

  • 相关阅读:
    html5图片异步上传/ 表单提交相关
    node 常用命令
    windows下 nvm下载node被墙了解决办法
    36.迷宫(广度优先搜索)
    36.迷宫(广度优先搜索)
    35.大质数
    35.大质数
    35.大质数
    35.大质数
    35.大质数
  • 原文地址:https://www.cnblogs.com/davidhhuan/p/2508692.html
Copyright © 2011-2022 走看看