서버관리
2020.05.23 06:26

Mysql 비밀번호 변경하는 방법

조회 수 69 추천 수 0 댓글 0
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄

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
번호 분류 제목 조회 수 추천 수
20 웹호스팅 [해외]a2hosting 178 0
19 리눅스 [Laravel] 라라벨 설치하기 PHP7.0 + Nginx 5 file 264 0
18 리눅스 top 에서 실행 중인 프로세스에서 어떤 파일이 사용되는지 파악하는 방법 file 58 0
17 리눅스 pstree 현재 사용자 프로세스 확인 189 0
16 리눅스 postfix 메일에서 queue 관리 152 0
15 리눅스 NGINX PHP-FPM 업데이트 및 여러 버전 동시 연동 방법 136 0
14 Mysqldump를 사용하여 MySQL데이터베이스를 백업 및 복원하는 방법 173 0
13 서버관리 mysqldump not found 372 0
» 서버관리 Mysql 비밀번호 변경하는 방법 69 0
11 리눅스 Linux/Ubuntu, 용량 큰 파일/디렉토리 찾아내기. file 536 0
10 VPS Linode VPS의 새로운 콘트롤 패널 file 203 0
9 VPS Linode VPS 디스크 용량 변경 방법 file 99 0
8 웹호스팅 innoDB 메모리 설정 방법 file 14 0
7 웹호스팅 http://rael.me/support.php secret 0 0
6 리눅스 Htop (Linux Process Monitoring) 사용법 file 1407 1
5 리눅스 How to remove imagemagick from Ubuntu 16.04 (Xenial Xerus) 186 0
4 웹호스팅 HestiaCP 설치방법 file 11 0
3 웹호스팅 HestiaCP 사용방법 11 0
2 리눅스 CentOS PHP/PHP-FPM 설치방법 24 0
1 웹호스팅 a2hosting 웹호스팅 단점/후회/불만 176 0
Board Pagination Prev 1 2 Next
/ 2
닫기

마이페이지

로그인을 해주세요

네이버로 로그인