Windows7和Windows10 安装MySQL5.7.13 版 ZIP配置版教程

 

一、配置文件配置如下:

如何获得my.ini 将my-default.ini复制一份并更名为my.ini

修改my.ini文件如下 :

# For advice on how to change settings please see
# http://dev.mysql.com/doc/refman/5.7/en/server-configuration-defaults.html
# *** DO NOT EDIT THIS FILE. It's a template which will be copied to the
# *** default location during install, and will be replaced if you
# *** upgrade to a newer version of MySQL.

[mysqld]
character-set-server=utf8
default-storage-engine=INNODB

# Remove leading # and set to the amount of RAM for the most important data
# cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%.
# innodb_buffer_pool_size = 128M

# Remove leading # to turn on a very important data integrity option: logging
# changes to the binary log between backups.
# log_bin

# These are commonly set, remove the # and set as required.
basedir = C:\mysql-5.7.13-winx64\
datadir = C:\mysql-5.7.13-winx64\data
port = 3306

server_id = 1


# Remove leading # to set options mainly useful for reporting servers.
# The server defaults are faster for transactions and fast SELECTs.
# Adjust sizes as needed, experiment to find the optimal values.
# join_buffer_size = 128M
# sort_buffer_size = 2M
# read_rnd_buffer_size = 2M 

sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES 
 

二、安装MySQL数据库在CMD命令行里如下: 

  1. Microsoft Windows [版本 10.0.16299.15] (c) 2017 Microsoft Corporation。保留所有权利。

  2. 切换到MySQL 解压目录下的bin目录

    C:\Windows\system32>cd /d c:\mysql-5.7.13-winx64\bin

     

  3. 初始化安装配置目录会在根目录下产生一个存放数据的data文件

     

    c:\mysql-5.7.13-winx64\bin>initialize-insecure

  4. 如果出现以下信息提示则可能已经初始化过了,要吗啊删除掉根目录下的data 要吗直接执行第5步,。
    'initialize-insecure' 不是内部或外部命令,也不是可运行的程序
    或批处理文件。

  5.  

    根据引导文件my.ini文件安装配置文件安装

    c:\mysql-5.7.13-winx64\bin>mysqld --install mysql57 --defaults-file="C:\mysql-5.7.13-winx64\my.ini"

     

  6. 安装成功
    Service successfully installed.

  7.  

    启动MySQL

    c:\mysql-5.7.13-winx64\bin>net start mysql57

     

  8. 启动状态
    mysql57 服务正在启动 .
    mysql57 服务已经启动成功。

转载于:https://my.oschina.net/u/3518854/blog/1612788

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值