DB/MariaDB

MariaDB 10.3 Access denied for user 'root'@'localhost' error

강서버 2020. 6. 2. 17:03
728x90
반응형

MariaDB 10.3 login error

 

$ mariadb -u root -p
Enter password: 
ERROR 1698 (28000): Access denied for user 'root'@'localhost'

 

$ sudo mariadb -u root -p

 (or sudo mysql -u root -p)

 

after login

 

MariaDB [(none)]> GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' IDENTIFIED BY 'PassW0rd';
Query OK, 0 rows affected (0.001 sec)

 

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

 

re-login

$ mariadb -u root -p

 

 

https://stackoverflow.com/questions/28068155/access-denied-for-user-rootlocalhost-using-password-yes-after-new-instal

728x90
반응형

'DB > MariaDB' 카테고리의 다른 글

CentOS 7 (x86_64) MariaDB 10.5 Install  (0) 2021.04.15
MariaDB 10.4 Table name case insensitive  (0) 2020.11.16
Ubuntu 20.04 MariaDB Install  (0) 2020.08.11
Ubuntu 18.04 MariaDB 10.4 install  (0) 2019.11.20
CentOS7 MariaDB 10.4 install  (0) 2019.11.20