Mac의 sql8에 ERROR 1045(28000)가 나타납니다. Access denied for user'root'@'localhost'(using password: YES)
./mysql -u root -p
오류 보고:
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
방법:
1. 애플->시스템 선호 설정->맨 밑에 mysql를 누르고 mysql 서비스를 닫는다.단말기
cd /usr/local/mysql/bin/
3. 관리자 권한
sudo su
4. 리턴은 mysql 검증 기능을 금지하고 mysql는 자동으로 리셋되며 선호 설정 중인 mysql 상태는running으로 변합니다
./mysqld_safe --skip-grant-tables &
5. sql 입장
./mysql
분호에 주의하다
flush privileges;
새 sql 문법입니다.
set password for 'root'@'localhost' = 'root';
정상 재로그인:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 9
Server version: 8.0.19 MySQL Community Server - GPL
Copyright (c) 2000, 2020, 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.
https://blog.csdn.net/z90818/article/details/88106973