win11安装MySQL

参考文档:MySQL :: MySQL 8.4 Reference Manual

1. 下载

   mysql官网下载msi安装程序:MySQL :: Begin Your Download

2. 安装

   运行下载的mis程序,逐步安装。

  • 安装模式: complete;

  • 进入配置:

  • data directory: mysql所有进行管理的物理数据存储路径,自行定义。

  • Type and Networking -Server Configuration Type: 不同的服务器配置模式对主机内存占用不同,本文使用development,针对个人电脑(typically this is your personal workstation).

  • Type and Networking -Connectivity: 定义如何连接到此MYSQL服务端。协议跟端口及windows端口防火墙均默认即可。named pipe参数用来授权用户访问级别,推荐Minimum access to all users (RECOMMENDED),Shared Memory参数用来定义共享内存连接,在同一台主机上定义多个mysql实例时有用。此参数区分大小写。

  • 高级配置不勾选show advanced选项,太麻烦辽

  • 账户角色: 记录root用户密码。其他用户有必要的话新增即可

  • 服务运行模式: 默认以windows服务模式自动运行,由windows服务统一管理。或者以mysql服务程序方式手动运行。此处我们默认windows统一管理运行。运行用户默认,保证权限。

  • 服务文件权限: 默认第一项服务运行用户及管理员组。

  • 演示数据库: 建不建无所谓。

  • 应用配置并等待完成即可:

应用配置时可能会报如下失败:

进入windows服务管理,将mysql84服务的登录属性调整为本地系统账户即可:

配置日志如下:

Beginning configuration step: Writing configuration file

Saving my.ini configuration file...
Saved my.ini configuration file.
Ended configuration step: Writing configuration file

Beginning configuration step: Updating Windows Firewall rules

Attempting to delete a Windows Firewall rule with command: netsh.exe advfirewall firewall delete rule name="Port 3306" protocol=TCP localport=3306

已删除 1 规则。
确定。


Adding a Windows Firewall rule for MySQL84 on port 3306.
Attempting to add a Windows Firewall rule with command: netsh.exe advfirewall firewall add rule name="Port 3306" protocol=TCP localport=3306 dir=in action=allow
确定。


Successfully added the Windows Firewall rule.
Adding a Windows Firewall rule for MySQL84 on port 33060.
Attempting to add a Windows Firewall rule with command: netsh.exe advfirewall firewall add rule name="Port 33060" protocol=TCP localport=33060 dir=in action=allow
确定。


Successfully added the Windows Firewall rule.
Ended configuration step: Updating Windows Firewall rules

Beginning configuration step: Adjusting Windows service

Attempting to grant the required filesystem permissions to the 'NT AUTHORITY\NetworkService' account.
Granted permissions to the data directory.
Granted permissions to the install directory.
Adding new service
New service added
Ended configuration step: Adjusting Windows service

Beginning configuration step: Starting the server

Attempting to start service MySQL84...
MySQL Server - start.
C:\Program Files\MySQL\MySQL Server 8.4\bin\mysqld.exe (mysqld 8.4.0) starting as process 33368
InnoDB initialization has started.
InnoDB initialization has ended.
CA certificate ca.pem is self signed.
Channel mysql_main configured to support TLS. Encrypted connections are now supported for this channel.
C:\Program Files\MySQL\MySQL Server 8.4\bin\mysqld.exe: ready for connections. Version: '8.4.0'  socket: ''  port: 3306  MySQL Community Server - GPL.
X Plugin ready for connections. Bind-address: '::' port: 33060
Successfully started service MySQL84.
Waiting until a connection to MySQL Server 8.4.0 can be established (with a maximum of 10 attempts)...
Retry 1: Attempting to connect to Mysql@localhost:3306 with user root with no password...
Successfully connected to MySQL Server 8.4.0.
Ended configuration step: Starting the server

Beginning configuration step: Updating the Start menu link

Attempting to verify command-line client shortcut.
Verified command-line client shortcut.
Verified command-line client shortcut.
Ended configuration step: Updating the Start menu link

Beginning configuration step: Updating example databases

Updating example databases...
Ended configuration step: Updating example databases

  • 24
    点赞
  • 25
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
要在Windows 11安装MySQL,可以按照以下步骤进行操作: 1. 首先,下载MySQL安装程序,可以从官方网站上获取最新版本的MySQL。考虑到稳定性和可靠性,建议选择MySQL 5.7系列。 2. 运行下载的MySQL安装程序,选择自定义安装。 3. 在安装选项中,选择安装MySQL Servers 5.7版本,并将其添加到右侧的选中框中。 4. 点击“Advanced Options”按钮,选择安装位置,并继续安装过程。 5. 在安装过程中,设置MySQL的密码,并完成安装。 6. 安装完成后,可以在开始菜单中搜索MySQL,并打开命令行界面。 7. 在命令行界面中,输入MySQL的密码,确认是否成功安装。 8. 为了方便使用MySQL,还需要配置环境变量。找到MySQL安装路径,然后在系统变量中选择“Path”,编辑该变量,将MySQL的路径添加进去。 9. 验证配置是否成功,可以在运行窗口中输入cmd,打开命令行界面,然后输入mysql -u root -p命令,输入密码,确认是否成功进入MySQL的操作管理界面。 总结一下,Win11安装MySQL的步骤如下: 1. 下载并运行MySQL安装程序 2. 选择自定义安装安装MySQL Servers 5.7版本 3. 设置密码并完成安装 4. 配置环境变量 5. 验证安装是否成功 以上是一种基本的安装步骤,根据不同的版本和个人需求可能会有所不同。请根据具体情况进行操作。<span class="em">1</span><span class="em">2</span><span class="em">3</span><span class="em">4</span>

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值