본문 바로가기

컴퓨터/노트북/인터넷

IT 컴퓨터 기기를 좋아하는 사람들의 모임방

조회 수 679 추천 수 0 댓글 0

단축키

Prev이전 문서

Next다음 문서

수정 삭제

단축키

Prev이전 문서

Next다음 문서

수정 삭제
Extra Form

1. ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)

mysql -u 사용자 >> mysql -u 사용자 -p 비번 or mysql -u 사용자 -p 후에 비번 입력 

2. ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
 사용자 비번이 틀렸을 경우에 발생함.. 비번이 확실히 맞는데 계속해서 안될 경우는 비번을 설정한 후에 MySQL에 변경사항을 적용하기 위한 flush privileges << 명령어를 입력하지 않아서 그렇습니다.
mysql >use mysql
mysql >update user set password=password('비번') where user='유저'; //비번변경
mysql >flush privileges; // 적용

>> 해결 방법 : flush privileges >> grant 테이블을 reload하여 변경사항을 적용하는 것이므로 이것을 안 했을 경우에는 shutdown이나 reload를 하면 적용이 됩니다.
# /usr/local/mysql/bin/mysqladmin -u root -p shutdown 후에 비번입력
# /usr/local/mysql/bin/mysqladmin -u root -p reload
 
3. 비번을 잊어버렸을 경우에는 
 # killall mysqld
 # mysqld_safe  --skip-grant-tables & // 비번입력없이 mysql 접속가능
 # 2번처럼 비번변경
 

 

Are you logging into MySQL as root? You have to explicitly grant privileges to your "regular" MySQL user account while logged in as MySQL root.

First set up a root account for your MySQL database.

In the terminal type:

mysqladmin -u root password 'password'

To log into MySQL, use this:

mysql -u root -p

To set the privileges manually start the server with the skip-grant-tables option, open mysql client and manually update the mysql.user table and/or the mysql.db tables. This can be a tedious task though so if what you need is an account with all privs I would do the following.

Start the server with the skip-grant-tables option

Start mysql client (without a username/password)

Issue the command

flush privileges;

which forces the grant tables to be loaded.

Create a new account with the GRANT command something like this (but replacing username and password with whatever you want to use.

GRANT ALL on *.* to 'username'@'localhost' identified by 'password';

Restart the server in normal mode (without skip-grant-tables) and log in with your newly created account.

Refer this MySQL docs.


컴퓨터/노트북/인터넷

IT 컴퓨터 기기를 좋아하는 사람들의 모임방

List of Articles
번호 분류 제목 조회 수 날짜
공지 뉴스 구글 최신 뉴스 file 1386 2024.12.12
HOT글 일반 아 진짜 요새 SKT 해킹 뭐시기 때문에 신경 쓰여 죽겠어 ㅠㅠ 2 237 2025.05.20
공지 사랑LOVE 포인트 만렙! 도전 4684 2025.03.19
공지 🚨(뉴비필독) 전체공지 & 포인트안내 3 25853 2024.11.04
공지 URL만 붙여넣으면 끝! 임베드 기능 20432 2025.01.21
109 사용기 쿨러마스터의 베이퍼 챔버 M.2 SSD 방열판, 카제 file 139 2024.10.15
108 사용기 SE535 사용후기 56 2021.01.31
107 사용기 [후기] 준 번들 후기입니다 정말좋네요 만원짜리가 아닙니다 63 2021.01.31
106 사용기 보스인이어2 후기 87 2021.01.31
105 사용기 우왕 um3x 샀다.!! 걍 나만의 후기 77 2021.01.31
104 사용기 포낙 112 인증 + 폼팁 T-140 껴본거 소감 47 2021.01.31
103 사용기 소니 블루투스 헤드폰 DR-BT101 인증샷 ㅋ 63 2021.01.31
102 사용기 에어팟맥스 스그 후기 71 2021.01.28
101 사용기 Xiaomi AIoT WiFi 6 라우터 AX3600 리뷰 후기 433 2020.12.18
100 사용기 [후기] 마이크로소프트 서피스 RT 92 2020.12.07
99 사용기 알파스캔 Q27P2C 제품 사용기 202 2020.11.25
98 사용기 끝판왕 그래픽카드 MSI 지포스 RTX 2080Ti 라이트닝 Z 언박싱 영상 By 컴맹이당 1 189 2019.02.19
97 사용기 QCY t1 후기 121 2019.02.11
96 사용기 QCY 블루투스 이어폰 2만원미만으로 직구하기 77 2019.02.11
95 사용기 극저소음과 가성비 최강! MSI 지포스 RTX 2060 벤투스 OC 언박싱 개봉기 96 2019.01.27
94 사용기 그래픽카드 끝판왕! MSI 지포스 RTX 2080 Ti 라이트닝Z 언박싱 개봉기 157 2019.01.23
93 사용기 삼성전자, 썬더볼트 3 채택 고성능 휴대용 SSD X5 리뷰 117 2018.08.30
92 사용기 브라보텍 트레저 x8 830t 장착기 사용기 추천기 이사기~ 1 90 2018.02.25
91 사용기 ABKO 수트마스터 605G 허블 RGB 컨트롤 4면 강화유리 교환기 1 104 2017.12.10
90 사용기 Surface Book 2 서피스북 사용 리뷰 181 2017.12.03
Board Pagination Prev 1 2 3 4 5 6 Next
/ 6