• 카테고리

    질문 & 답변
  • 세부 분야

    백엔드

  • 해결 여부

    미해결

mysql root 비번

21.10.10 19:36 작성 조회수 453

0

- 학습 관련 질문을 남겨주세요. 상세히 작성하면 더 좋아요!
- 먼저 유사한 질문이 있었는지 검색해보세요.
- 서로 예의를 지키며 존중하는 문화를 만들어가요.
- 잠깐! 인프런 서비스 운영 관련 문의는 1:1 문의하기를 이용해주세요.
 
 

mysql 초기 비번 설정 되어 있는지 아래와 같이

계속 root 접속이 안됩니다..

구글링 해서 root 비번 변경하려고 계속 해봤는데.,. 계속 안되네요.. 

 

   - 아래 - 

C:\eGovFrame-3.9.0\bin\mysql-5.6.21\bin> mysql -u root -p mysql

Enter password: ********

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

 

C:\eGovFrame-3.9.0\bin\mysql-5.6.21\bin> mysql -u root -p mysql

Enter password:

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

 

C:\eGovFrame-3.9.0\bin\mysql-5.6.21\bin>mysql -u root

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

 

C:\eGovFrame-3.9.0\bin\mysql-5.6.21\bin>mysql -u root

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

 

- 아래 2 (구글링 root 초기화) - 

 

C:\Program Files\MySQL\MySQL Server 8.0\bin>mysqld.exe --skip-grant

2021-10-10T10:01:11.216348Z 0 [System] [MY-010116] [Server] C:\Program Files\MySQL\MySQL Server 8.0\bin\mysqld.exe (mysqld 8.0.25) starting as process 1624

2021-10-10T10:01:11.228426Z 0 [Warning] [MY-010091] [Server] Can't create test file C:\Program Files\MySQL\MySQL Server 8.0\data\mysqld_tmp_file_case_insensitive_test.lower-test

2021-10-10T10:01:11.228752Z 0 [Warning] [MY-010091] [Server] Can't create test file C:\Program Files\MySQL\MySQL Server 8.0\data\mysqld_tmp_file_case_insensitive_test.lower-test

2021-10-10T10:01:11.229557Z 0 [ERROR] [MY-013276] [Server] Failed to set datadir to 'C:\Program Files\MySQL\MySQL Server 8.0\data\' (OS errno: 2 - No such file or directory)

2021-10-10T10:01:11.234033Z 0 [ERROR] [MY-010119] [Server] Aborting

2021-10-10T10:01:11.235171Z 0 [System] [MY-010910] [Server] C:\Program Files\MySQL\MySQL Server 8.0\bin\mysqld.exe: Shutdown complete (mysqld 8.0.25)  MySQL Community Server - GPL.

 

C:\Program Files\MySQL\MySQL Server 8.0\bin>

 

 

- 아래 (구글 초기화2) ---

C:\eGovFrame-3.9.0\bin\mysql-5.6.21\bin>mysqld --skip-grant

2021-10-10 19:23:50 0 [Warning] 'THREAD_CONCURRENCY' is deprecated and will be removed in a future release.

2021-10-10 19:23:50 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).

 

C:\eGovFrame-3.9.0\bin\mysql-5.6.21\bin>mysqld.exe --skip-grant --explicit_defaults_for_timestamp=1

2021-10-10 19:24:08 0 [Warning] 'THREAD_CONCURRENCY' is deprecated and will be removed in a future release.

 

C:\eGovFrame-3.9.0\bin\mysql-5.6.21\bin>mysqld.exe --skip-grant --explicit_defaults_for_timestamp=1

2021-10-10 19:25:55 0 [Warning] 'THREAD_CONCURRENCY' is deprecated and will be removed in a future release.

 

C:\eGovFrame-3.9.0\bin\mysql-5.6.21\bin>

C:\eGovFrame-3.9.0\bin\mysql-5.6.21\bin>mysql.exe -u root --console

mysql.exe: unknown option '--console'

 

C:\eGovFrame-3.9.0\bin\mysql-5.6.21\bin>mysql.exe -u root

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

 

 

어떻게 하면 될까요.. ㅠ 계속 커넥션 못해서 담 강의를 못 가고 있습니다. (2일 째..)

답변 2

·

답변을 작성해보세요.

0

C:\eGovFrame-3.9.0\bin\mysql-5.6.21\bin> mysql -u root -p
이렇게해보세요 뒤에 -p 다음에 mysql을 쓰지마시구요^^

0

mysql -u root  -p

이렇게 하시면 아래처럼 패스워드 입력이 나오면 그냥 엔터치시면 접속이 됩니다.

Enter password : 엔터

mysql>여기서 root패스워드를 새로 지정해주시면 되구요^^

jaehun님의 프로필

jaehun

질문자

2021.10.12

그냥 엔터 치면 패스워드가 있다고,  아래와 같이 에러가 발생합니다.

(전자정부 설치 이후 따로 패스워드 설정 안했음)

C:\eGovFrame-3.9.0\bin\mysql-5.6.21\bin> mysql -u root -p mysql

Enter password:

 

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