Windows手动安装MySQL Server 8.0.16

本文介绍了如何手动在Windows上安装MySQL Server 8.0.16,避免msi安装的错误和问题。通过下载压缩包,解压并创建必要的配置文件,然后执行初始化、安装服务和启动服务的步骤,最终修改root用户的密码来完成安装。过程中需要注意my.ini文件的格式设置和日志文件路径的调整。
摘要由CSDN通过智能技术生成

一、说明

  • 不推荐使用msi进行安装,安装过程会出错,坑很多,直接下载压缩包手动安装。
  • 这篇文章也是自己折腾了很久后才安装好,想想还是写下来,也许会帮助到人,内容也大多是整合的网上的资料,但是步骤还是自己一步一步地来操作并且记录下来的。

二、下载压缩包

三、将压缩包解压,并创建需要的文件

  1. 既然是手动安装了,这安装位置就我们自己选择了,这里装在D盘
  2. 将文件解压到D:/MySQL/MySQL Server 8.0/目录下,使用msi安装就是这个目录结构,我们这里就跟他保持一致吧
  3. 解压好后目录结构如图:
    目录结构图
  4. 在该目录下创建my.ini文件,写入以下内容,然后另存为ANSI格式(这也是msi自动安装时的坑,msi的格式不是ANSI导致服务无法启动),这个是从msi里面提取的配置文件,直接复制进去就是,可以说是很详尽的配置信息了,至于里面大小等参数就只有靠你自己测试了,还有里面参数的意思等都可以直接百度到,我这里就不过多解释了。日志那一块儿的配置那些文件名(SAMSUNG-300E5K)就改成你自己电脑的名字,当然这个无关紧要,那些日志文件到时候会生成在data文件夹里面。
# Other default tuning values
# MySQL Server Instance Configuration File
# ----------------------------------------------------------------------
# Generated by the MySQL Server Instance Configuration Wizard
#
#
# Installation Instructions
# ----------------------------------------------------------------------
#
# On Linux you can copy this file to /etc/my.cnf to set global options,
# mysql-data-dir/my.cnf to set server-specific options
# (@localstatedir@ for this installation) or to
# ~/.my.cnf to set user-specific options.
#
# On Windows you should keep this file in the installation directory 
# of your server (e.g. C:\Program Files\MySQL\MySQL Server X.Y). To
# make sure the server reads the config file use the startup option 
# "--defaults-file". 
#
# To run the server from the command line, execute this in a 
# command line shell, e.g.
# mysqld --defaults-file="C:\Program Files\MySQL\MySQL Server X.Y\my.ini"
#
# To install the server as a Windows service manually, execute this in a 
# command line shell, e.g.
# mysqld --install MySQLXY --defaults-file="C:\Program Files\MySQL\MySQL Server X.Y\my.ini"
#
# And then execute this in a command line shell to start the server, e.g.
# net start MySQLXY
#
#
# Guidelines for editing this file
# ----------------------------------------------------------------------
#
# In this file, you can use all long options that the program supports.
# If you want to know the options a program supports, start the program
# with the "--help" option.
#
# More detailed information about the individual options can also be
# found in the manual.
#
# For advice on how to change settings please see
# https://dev.mysql.com/doc/refman/8.0/en/server-configuration-defaults.html
#
#
# CLIENT SECTION
# ----------------------------------------------------------------------
#
# The following options will be read by MySQL client applications.
# Note that only client applications shipped by MySQL are guaranteed
# to read this section. If you want your own MySQL client program to
# honor these values, you need to specify it as an option during the
# MySQL client library initialization.
#
[client]

# pipe=

# socket=MYSQL

port=3306

[mysql]
no-beep

default-character-set=utf8mb4

# SERVER SECTION
# ----------------------------------------------------------------------
#
# The following options will be read by the MySQL Server. Make sure that
# you have installed the server correctly (see above) so it reads this 
# file.
# server_type=3
[mysqld]

# The next three options are mutually exclusive to SERVER_PORT below.
# skip-networking
# enable-named-pipe
# shared-memory

# shared-memory-base-name=MYSQL

# The Pipe the MySQL Server will use
# socket=MYSQL

# The TCP/IP Port the MySQL Server will listen on
port=3306

# Path to installation directory. All paths are usually resolved relative to this.
basedir="D:/MySQL/MySQL Server 8.0/"

# Path to the da
  • 3
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 5
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 5
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值