mysql root 패스워드 설정
ubuntu에 apt install을 이용하여 msyql-server를 설치했습니다.
mysql 5.7.26 버전입니다.
root는 localhost만 접속하게하고 다른 사용자 아이디를 추가하여 특정 database에만 접근 가능하게 한것까지는 설정했는데요.
root 비밀번호를 업데이트 해도 계속 비번없이 접속됩니다.
mysql> select user, host, authentication_string from user;
+------------------+-----------+-------------------------------------------+
| user | host | authentication_string |
+------------------+-----------+-------------------------------------------+
| root | localhost | ***************************************** |
| mysql.session | localhost | ***************************************** |
| mysql.sys | localhost | ***************************************** |
| debian-sys-maint | localhost | ***************************************** |
| userid | % | ***************************************** |
| userid | localhost | ***************************************** |
+------------------+-----------+-------------------------------------------+
6 rows in set (0.00 sec)
root@481ff4f5:/home/user# mysql -uroot
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 13
Server version: 5.7.26-0ubuntu0.18.04.1 (Ubuntu)
Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.
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>
어떻게 설정해야 할까요? =_=
일단 저라면 FLUSH PRIVILEGES를 먼저
일단 저라면
FLUSH PRIVILEGES
를 먼저 시도해 보겠습니다.https://dev.mysql.com/doc/refman/5.7/en/privilege-changes.html
댓글 달기