標籤:mariadb
當在命令提示字元下執行該命令時,報下列錯誤
[[email protected]]# mysqladmin -u root password "sorry"
mysqladmin: connect to server at ‘localhost‘ failed
error: ‘Access denied for user ‘root‘@‘localhost‘ (using password: NO)‘
解決辦法:
[[email protected]]# mysql -u root -p
Enter password:
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 110
Server version: 5.5.31-MariaDB-log MariaDB Server
Copyright (c) 2000, 2013, Oracle, Monty Program Ab and others.
Type ‘help;‘ or ‘\h‘ for help. Type ‘\c‘ to clear the current input statement.
MariaDB [(none)]> set password for ‘root‘@‘localhost‘ =password(‘‘);
Query OK, 0 rows affected (0.00 sec)
MariaDB [(none)]> flush privileges;
Query OK, 0 rows affected (0.00 sec)
問題解決
本文出自 “雲人生” 部落格,請務必保留此出處http://ovcer.blog.51cto.com/1145188/1653660
MySQL報'Access denied for user 'root'@'localhost' (using password: NO)'錯誤的解決