본문 바로가기

카테고리 없음

ERROR 1698 (28000): Access denied for user 'root'@'localhost'


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

 

ubuntu에서 mysql -u root -p를 하면 오류난다

해결방법 : root로 가서 mysql을 열어준다 


ubuntu@ip-:~$ su -
Password:
root@ip-:~# mysql -u root -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 66
Server version: 8.0.29-0ubuntu0.22.04.2 (Ubuntu)

Copyright (c) 2000, 2022, Oracle and/or its affiliates.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> 성공~