반응형
Maria DB 설치 후 초기 패스워드 설정 방법에 대해 공유드립니다.
[root@dalgong /]# mysql -u root -p
Enter password: Enter
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 8
Server version: 10.3.35-MariaDB MariaDB Server
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
=> 우선 mariadb에 root계정을 사용하여 접속하여줍니다.
=> 현재 root 패스워드가 설정되어있지 않아 Enter로 접속이 가능합니다.
MariaDB [(none)]> use mysql;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
MariaDB [mysql]> update user set password=password('newpassword') where user='root';
Query OK, 4 rows affected (0.000 sec)
Rows matched: 4 Changed: 4 Warnings: 0
MariaDB [mysql]> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.000 sec)
=> 원하는 패스워드 입력 후 적용해주시면 패스워드 변경이 완료됩니다.
반응형
'DB > MairaDB' 카테고리의 다른 글
[MariaDB] MariaDB Errorlog 설정 (0) | 2024.09.03 |
---|