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

时间:2015-01-31 07:04:51   收藏:0   阅读:1323

[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 /]#

评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!