码迷,mamicode.com
首页 > 数据库 > 详细

mariadb 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)

时间:2015-01-31 07:04:51      阅读:1323      评论:0      收藏:0      [点我收藏+]

标签:

[root@localhost /]# systemctl stop mariadb.service
[root@localhost /]# mysqld_safe --user=mysql --skip-grant-tables --skip-networking &
[1] 46043
[root@localhost /]# 150131 03:15:27 mysqld_safe Logging to ‘/var/log/mariadb/mariadb.log‘.
150131 03:15:27 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
mysql -u root mysql

MariaDB [mysql]> UPDATE user SET Password=PASSWORD(‘123123‘) where USER=‘root‘;
Query OK, 1 row affected (0.01 sec)
Rows matched: 3 Changed: 1 Warnings: 0

MariaDB [mysql]> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.00 sec)

MariaDB [mysql]> quit
Bye

[root@localhost /]# systemctl start mariadb.service
[root@localhost /]#

mariadb 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)

标签:

原文地址:http://www.cnblogs.com/lonelyxmas/p/4263568.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!