手机版 网站建设 网站设计 网站开发 网站制作 16年专业品质
  • 微信
    微信二维码
  • 微博
  • 商城

Windows Server 上安装部署 WordPress(2):安装 MySQL

作者:admin  发布时间:2020-03-10 10:20:10

操作系统环境说明:

本文以英文版 Windows Server 2008 R2 操作系统为例,中文版以及更高版本的 Windows Server 2012、2016等,安装部署操作都是一样的。

下载 MySQL 安装文件

建议到官方网站下载安装文件。Windows 上安装 MySQL 所需文件:

为保证一次性顺利安装,建议下载完整版的 MySQL Installer 安装包程序文件,不要下载 Web 版的。Web 版安装文件实际是在安装过程中下载所需文件的。完整版安装包也就300多 MB,安装时选择所需产品或者组件即可。

Oracle MySQL 官方安装包文件下载页面

Windows Server 上安装 MySQL 步骤

服务器上只需要安装 MySQL Server 就可以了, 如果要在服务器上操作 MySQL 数据库,建议把 MySQL Workbench 客户端工具也装上。本示例假设要安装 MySQL Server 和 MySQL Workbench。

1. 双击下载好的 MySQL Installer 安装包文件。

2. 选中 I accept the license terms 同意许可协议,Next 下一步。

Windows Server 安装 MySQL,同意许可协议

3. 选择 Custom 选项,Next 下一步。

如果只是要安装 MySQL Server,选择 Server only 选项即可。

Windows Server 安装 MySQL,Custom 自定义安装

4. 添加 MySQL Server 5.7.20 – X64  MySQL Workbench 6.3.9 – X64 到右侧 Product/Features To Be Installed,Next 下一步。

Windows Server 安装 MySQL,选择 MySQL Server 和 Workbench 产品

Windows Server 安装 MySQL,选择MySQL Server 和 Workbench 产品

5. 选中 MySQL Server 5.7.20 – X64,可以点击 Advanced Options,修改一下目标安装路径,OK 确定,Next 下一步。

Windows Server 安装 MySQL,更改 MySQL Server 安装路径

6. 然后可能就提示缺少 Microsoft Visual C++ Redistributable Packages (x64) 了。

Windows Server 安装 MySQL,缺少 Microsoft Visual C++ 可再发行组件包

7. 虽然界面上提示“The installer will attempt to resolve some of this automatically”,但是我还是选择 Cancel 关闭了 My SQL Installer,自己手动下载安装。

7.1 下载 Microsoft Visual C++ 2013 Redistributable (x64),进行安装。

Windows Server 安装 MySQL,安装 Microsoft Visual C++ 2013 可再发行组件包

7.2 我遇到的问题:虽然提示缺少的是 x64 版本的 Microsoft Visual C++ 2013 Redistributable,我也安装了,但是再次运行 MySQL Installer 到这一步时老是提示安装失败,报错“This application requires Visual Studio 2013 Redistributable. Please install the Redistributable then run this installer again.”。所以我索性把 x86 版本的 Microsoft Visual C++ 2013 Redistributable 也安装了,结果再一次尝试的时候,成功了!

8. Ready to Install 准备安装,Execute 执行安装。

Windows Server 安装 MySQL,Ready to install 准备安装

9. 安装成功完成,Next 下一步。

Windows Server 安装 MySQL,安装完成

10. Next 下一步开始配置 MySQL Server。

Windows Server 安装 MySQL,Ready to Config 准备配置

11. Type and Networking 类型和网络,选择 Standalone MYSQL Server/Classic MySQL Replication,Next 下一步。

Windows Server 安装 MySQL,选择网络类型

12. Server Configuration Type, 根据自己需要选择,我是在产品环境安装,所以我选择Server Machine。如果你的机器只运行 My SQL,可以选择 Dedicated Machine

Windows Server 安装 MySQL,选择配置类型

MySQL 默认 TCP 端口是3306,可以修改为一个别的。

Windows Server 安装 MySQL,修改 TCP 端口号,默认3306

13. Accounts and Roles 账号和角色,设置 Root 账号 Password。在这里可以点 Add User 添加一些数据库用户,也可以等安装完成后用 Workbench 客户端工具或者 MySQL 命令添加、设置。

Windows Server 安装 MySQL,设置 Root 用户密码

14. 配置 MySQL 为 Windows Service,可以修改 Service Name。

Windows Server 安装 MySQL,配置 MySQL Windows Service

15. Plugins and Extensions 插件和扩展,对 WordPress 没用,Next 下一步。

Windows Server 安装 MySQL,插件和扩展 Plugins and Extensions

16. Apply Configuration 应用配置,Execute 执行配置。

Windows Server 安装 MySQL,Apply Configuration 应用配置

17. 全绿,Finish 配置完成。

Windows Server 安装 MySQL,Apply Configuration 应用配置完成

18. Next 下一步。

Windows Server 安装 MySQL,Configuration Complete 配置完成

19. Installed Complete 完成安装。

Windows Server 安装 MySQL,Installation Complete 安装完成

20. 打开 Windows Services 服务管理器,会看到 MySQL57 服务。

Windows Server 安装 MySQL,查看 MySQL Windows 服务

用 MySQL Workbench 连接 My SQL Server,测试安装结果

1. 打开 MySQL Workbench,输入密码连接 MySQL Server:

Windows Server 安装 MySQL,Workbench 连接 MySQL Srever

2. 新安装的 MySQL 只有一个 sys 系统数据库。

Windows Server 安装 MySQL,Workbench 连接 MySQL Server 成功

好了,Windows 全新安装 MySQL 就完成了。

上一篇: Windows IIS 上安装部署 WordPress 网站快速简要教程 下一篇: Windows Server 上安装部署 WordPress(3):在 IIS 上安装配置 PHP 支持
返回列表
16年专业品质
互联网品牌推广专家
专业的建站、人机交互策划、高端UI设计、移动应用开发公司
业务电话:020/22373839    15915747484
业务QQ:641589319
业务QQ:1375530069
广州总部地址:广东省广州市越秀区先烈中路69号东山广场2904室 邮编:510111
海极网络微信二维码