728x90
MySQL(5.7.19 이후 버전) 설치 후 아래와 같은 에러가 발생
ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement.
아래 명령으로 패스워드를 변경
SET PASSWORD = PASSWORD('P@ssw0rd1!');
./mysql -uroot -p
$ ./mysql -uroot -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 6
Server version: 5.7.19
Copyright (c) 2000, 2017, 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>
show databases;
mysql> show databases;
ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement.
SET PASSWORD = PASSWORD('P@ssw0rd1!');
mysql> SET PASSWORD = PASSWORD('P@ssw0rd1!');
Query OK, 0 rows affected, 1 warning (0.01 sec)
select 1;
mysql> select 1;
+---+
| 1 |
+---+
| 1 |
+---+
1 row in set (0.00 sec)
FLUSH privileges;
mysql> FLUSH privileges;
Query OK, 0 rows affected (0.00 sec)
show databases;
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| performance_schema |
| sys |
+--------------------+
4 rows in set (0.00 sec)
exit
mysql> exit
Bye
728x90
'리눅스' 카테고리의 다른 글
[리눅스] CentOS 7에서 Kubernetes 제거 (0) | 2022.04.01 |
---|---|
[리눅스] docker ps filter 옵션 (0) | 2022.03.31 |
[리눅스] MySQL 5.7 이후 버전 root 비밀번호 변경 (0) | 2022.03.30 |
[리눅스] paste 명령어 (0) | 2022.03.29 |
[리눅스] 젠킨스 빌드 이름 및 설명 설정자(Build Name and Description Setter) 플러그인 (0) | 2022.03.28 |
[리눅스] private docker registry 사용 방법 (0) | 2022.03.28 |