서버관리
2020.05.23 06:26

Mysql 비밀번호 변경하는 방법

Views 69 Votes 0 Comment 0
?

Shortcut

PrevPrev Article

NextNext Article

Larger Font Smaller Font Up Down Go comment Print
?

Shortcut

PrevPrev Article

NextNext Article

Larger Font Smaller Font Up Down Go comment Print

https://to-dy.tistory.com/58

http://blog.naver.com/PostView.nhn?blogId=tollu09&logNo=220845838393

https://inma.tistory.com/98

MySQL 비밀번호 변경

(1) MySQL 실행

$ mysql -u root -p
Enter password:
None

(2) 비밀번호 변경을 위해 mysql 데이터베이스 사용

mysql> 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
None

(3) 현재 암호 확인

// mysql 5.x 는 "password" 또는 "authentication_string"로 확인합니다.
mysql> select host, user, password from user;
mysql> select host, user, authentication_string from user;

// mysql 8.x
mysql> select host, user, authentication_string from user;
None

(4) 비밀번호 변경

root 계정의 비밀번호를 1234로 변경

// mysql 5.x
mysql> update user set password=password('1234') where user='root';
mysql> update user set authentication_string=password('1234') where user='root';

// mysql 8.x
mysql> alter user 'root'@'localhost' identified with mysql_native_password by '1234;
None

(5) 종료

변경사항을 적용하기 위해 아래 명령어를 실행한 후 종료하면 비밀번호 변경이 완료됩니다.

mysql> flush privileges;
mysql> quit
Bye
None


기존대댓글
추가시작 대댓글시작
대댓글끝 추가끝


List of Articles
No. Category Subject Views Votes
20 서버관리 서버 이전 160 0
19 서버관리 신규 사용자 생성 secret 0 0
18 서버관리 mysqldump not found 372 0
17 Mysqldump를 사용하여 MySQL데이터베이스를 백업 및 복원하는 방법 173 0
» 서버관리 Mysql 비밀번호 변경하는 방법 69 0
15 서버관리 신규 유저 생성 270 0
14 서버관리 소유자 권한 설정 257 0
13 서버관리 압축해제 267 0
12 서버관리 아파치 재실행 228 0
11 리눅스 리눅스 tar 특정폴더 제외하고 압축하기 235 0
10 웹호스팅 사이트 백업하는 방법 131 1
9 VPS 요즘 일방문자가 5000~6000씩 찍히는데 이유를 모르겠습니다. file 32 0
8 리눅스 리눅스 그룹 생성/삭제/확인/추가 - groupadd file 18 0
7 리눅스 CentOS PHP/PHP-FPM 설치방법 24 0
6 리눅스 리스토리의 IT's/IT Story Mysql 설치후 phpMyadmin 접속 안될때 - Cannot start session 26 0
5 웹호스팅 웹호스팅에서 php 설정 변경하는 방법 29 0
4 리눅스 리눅스 / 사용자 / 사용자 조회, 사용자 추가, 사용자 삭제, 사용자 수정 17 0
3 웹호스팅 HestiaCP 설치방법 file 11 0
2 웹호스팅 HestiaCP 사용방법 11 0
1 웹호스팅 innoDB 메모리 설정 방법 file 14 0
Board Pagination Prev 1 2 Next
/ 2
닫기

마이페이지

로그인을 해주세요

네이버로 로그인