구덩이 노트에 MySQL의 설치 단계

구덩이 노트에 MySQL의 설치 단계


제거 여러 번 설치하고 마침내 성공 MYSQL, 그는 구덩이에 대한 기록을 밟았

구덩이 속으로

첫 번째는 다운로드 버전 8.0.18의 공식 웹 사이트입니다
그림 삽입 설명 여기
서버의 끝에 항상 실패로 설치시에 시작
그림 삽입 설명 여기
로그 디스플레이 문제

MySQL error 1042: Unable to connect to any of the specified MySQL hosts.
Failed to connect to MySQL Server 8.0.18 after 10 attempts.
Ended configuration step: Starting the server

그런 다음, 친구의 권고를 보면 mysql80 서비스를 마우스 오른쪽> 속성을 찾을 수>에 로그온 시스템 계정> OK, 다시 실행 성공의 비용을 변경할 수 있지만 내가 성공하지 못했습니다
포털


다음 제거, 5.7.28 다운로드 낮은 버전
나는 친구가 언로드의 권고에 따라이었다 포털을
하지만 난 다른 추가 단계를 처리하지 제거, 단지 제거 내가 확인했다 완료, 추가 단계, 그리고 별도의 파일입니다 .
C는 : \ 문서 및 설정 디렉토리 요구의 선택을 취소 숨기기 보호 된 파일을 표시 한 다음 모든 권한을 부여합니다
그림 삽입 설명 여기

다운로드 버전 5.7

그림 삽입 설명 여기

그림 삽입 설명 여기
압축 된 버전을 다운로드, 당신은 직접 추출 할 수 있습니다

  • 압축 해제 후, 내 문서 디렉토리
    D : \ 사용자 \ Jsong \ 도구 \ MySQL은 \ MySQL의-5.7.22-winx64
  • 이 디렉토리에있는 새의 my.ini 파일은 인코딩 형식 ANSI 형식으로 인코딩 선택
    ANSI 형식으로 인코딩> nodepad 형식을

[mysql]
# 设置mysql客户端默认字符集
default-character-set=utf8
[mysqld]
#设置3306端口
port = 3306
# 设置mysql的安装目录
basedir=D:\\Users\\Jsong\\tools\\Mysql\\mysql-5.7.22-winx64

datadir=D:\\Users\\Jsong\\tools\\Mysql\\mysql-5.7.22-winx64\\data
# 允许最大连接数
max_connections=200
# 服务端使用的字符集默认为8比特编码的latin1字符集
character-set-server=utf8
# 创建新表时将使用的默认存储引擎
default-storage-engine=INNODB

\\ 사용에 대한 주석
기본 디렉토리 = D : \\ \\ Jsong [사용자 도구 \\ \\ \\ MySQL은 MySQL의-5.7.22-Winx64
DATADIR = D : \\ \\ Jsong [사용자 도구 \\ \\ \\ MySQL의 MySQL- 5.7.22-winx64 \\ 데이터

이 문제가의 그렇지 않으면 MySQL의 초기화

mysqld: Can't create/write to file 'D:\Users\Jsong      ools\Mysql\mysql-5.7.22-winx64\data\is_writable' (Errcode: 2 - No such file or directory)
2019-11-09T02:16:53.861687Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2019-11-09T02:16:53.862353Z 0 [ERROR] Can't find error-message file 'D:\Users\Jsong     ools\Mysql\mysql-5.7.22-winx64\share\errmsg.sys'. Check error-message file location and 'lc-messages-dir' configuration directive.
2019-11-09T02:16:53.864165Z 0 [ERROR] --initialize specified but the data directory exists and is not writable. Aborting.
2019-11-09T02:16:53.864376Z 0 [ERROR] Aborting

  • 설치
    는 D에 : \ 사용자 \ Jsong \ 도구 \ MySQL은 \ MySQL의-5.7.22-winx64 \ 빈 수행 할 수있는 디렉토리

설치 mysqld를

새로운 문제의 출현이
시작하지 못했습니다 (0xc000007b) 정상
다운로드 driectx
이 문서를 참조하십시오

  • 데이터베이스를 초기화
    D에있을 것입니다 : \ 사용자 \ Jsong \ 도구 \ MySQL은 \ 데이터가 데이터베이스 파일을 생성하는 폴더 \ mysql을 - 5.7.22 - winx64

mysqld를 --initialize

  • 카이 서비스

NET START mysql을

  • 데이터베이스에 연결

MySQL의 -u {사용자 이름} -p {암호}

  • 루트 사용자 암호 확인
    D를 : \ 사용자 \ Jsong \ 도구 \ MySQL은 \ MySQL의-5.7.22-winx64 \ 데이터 \ xxx.err의
    파일에 기록 된 비밀 루트 @ localhost를 : 7lKyqqMt 0TU!
2019-11-09T02:19:16.178984Z 1 [Note] A temporary password is generated for root@localhost: 7lKyqqMt!0TU
  • 로그인

MySQL의 -uroot -p7lKyqqMt! 0TU

D:\Users\Jsong\tools\Mysql\mysql-5.7.22-winx64\bin>mysql -uroot -p7lKyqqMt!0TU
mysql: [Warning] Using a password on the command line interface can be insecure.
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 15
Server version: 5.7.22

Copyright (c) 2000, 2018, 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.
  • 암호 변경

ALTER 사용자 root @ localhost를 '1'로 식별;

mysql> alter user root@localhost identified by '1';
Query OK, 0 rows affected (0.00 sec)
  • 종료

출구;

  • 서비스 중지

에서 net stop mysql을

게시 83 개 원래 기사 · 원 찬양 21 ·은 50000 +를 볼

추천

출처blog.csdn.net/JsongNeu/article/details/102985241