MySQL에 로그인할 때 Access denied 오류 프롬프트가 표시됩니다.

1492 단어
비밀번호를 잊어버렸을 때 권한 인증 1을 건너뛰는 데 적용됩니다.mysql을 설치한 후 로그인할 때 Access denied 프롬프트
hadoop001:mysqladmin:/usr/local/mysql:>mysql -uroot -p
Enter password: 
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)

둘.설정 파일을 보고 skip-grant-tables를 [mysqld] 아래에 놓으십시오 skip-grant-tables의 역할은 권한 인증을 건너뛰는 skip-external-locking의 역할은 외부 잠금을 건너뛰는 것입니다
[mysqld]
port            = 3306
socket          = /usr/local/mysql/data/mysql.sock
skip-grant-tables
skip-external-locking

셋.서비스를 다시 시작하거나 사용하는crt, xshell을 닫습니다
hadoop001:mysqladmin:/usr/local/mysql:>service mysql stop
Shutting down MySQL..                                           [  OK  ]
hadoop001:mysqladmin:/usr/local/mysql:>service mysql start
Shutting  MySQL..                                                   [  OK  ]


넷.MySQL 다시 로그인
hadoop001:mysqladmin:/usr/local/mysql:>mysql -uroot -p
Enter password: 
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.6.23-log MySQL Community Server (GPL)

Copyright (c) 2000, 2015, 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.

mysql> 

좋은 웹페이지 즐겨찾기