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.
728x90
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)
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)
mysql> exit
Bye
728x90
'리눅스' 카테고리의 다른 글
CentOS 7에서 Kubernetes를 제거하는 방법 (0) | 2022.04.01 |
---|---|
[리눅스] docker ps filter 옵션 (0) | 2022.03.31 |
VMware ESXi 환경에서 리눅스 가상 머신(VM)의 하드 디스크 용량을 증설하는 방법 - CentOS (0) | 2022.03.30 |
paste 명령어 (0) | 2022.03.29 |
[리눅스] 젠킨스 빌드 이름 및 설명 설정자(Build Name and Description Setter) 플러그인 (0) | 2022.03.28 |