Mac 에서 Mysql ERROR 1045(28000)해결:Access denied for user'root'@'localhost'
sudo mysqld_safe --user=mysql --skip-grant-tables --skip-networking &
재 입력:sudo mysql -u root mysql
my sql 에 들 어가>다음 명령 을 수행 합 니 다:update user set password_expired = "Y" where user="root";
재 입력:flush privileges;
이 단 계 는 매우 중요 합 니 다.그리고quit
3,로그 인 입력:mysql -uroot -p
비밀 번 호 를 입력 하 라 고 알려 줍 니 다.이 비밀 번 호 는 my sql 을 설치 할 때 나타 나 는 것 입 니 다.2017-12-13T09:25:15.976324Z 1 [Note] A temporary password is generated for root@localhost: ug&eyEFeo08n
If you lose this password, please consult the section How to Reset the Root Password in the MySQL reference manual.
이 알림 에서 비밀 번 호 는
ug&eyEFeo08n
입 니 다.입력 하면 됩 니 다.4.로그 인 성공 후 비밀 번 호 를 변경 할 수 있 습 니 다:set password for root@localhost = password('123456');
그 후에 로그 인하 면 123456 이라는 비밀 번 호 를 사 용 했 습 니 다.