MariaDB:登陆报错:mysqladmin: connect to server at 'localhost' failed

见图:

image

解决办法:

  1. /etc/init.d/mysqld stop
  2. mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
  3. mysql -uroot –p
  4. mysql> UPDATE user SET Password=PASSWORD('新的密码') where USER='root' and hos t='root' or host='localhost';
  5. mysql> FLUSH PRIVILEGES;
  6. mysql> quit;
  7. /etc/init.d/mysqld start
  8. mysql -uroot –p  输入新的密码
posted @ 2017-05-25 18:26  huiy_小溪  阅读(610)  评论(0编辑  收藏  举报