MySQL数据库for Java安装和配置三件套必备
- MySQL installer
- MySQL server
- Connector/J
- 注意事项:先安装MySQL installer,社区版MySQL Community Edition为免费版本(下载网址:https://dev.mysql.com/downloads/windows/installer/),在MySQL installer内安装MySQL server和Connector/J。
MySQL installer安装
下载完.msi安装包后,直接安装。有5种安装类型:
- 开发者安装
- 只安装服务器
- 只安装客户端
- 全部安装
- 自定义安装
对于学习和开发,建议在Choosing a Setup type 中选择开发者安装Developer Default,然后一直next到finish。
检查是否已经安装MySQL server和Connector/J
- 打开MySQL installer
- 查看是否安装(有则代表安装成功,跳到如果没有继续看下文)
MySQL server和Connector/J安装
- 增加MySQL server和Connector/J
- 选择需要安装的软件
- 注意事项:选择版本时注意Requirement,即需要的配置,如缺少,需要去下载安装再回头安装MySQL server。
MySQL server配置
- Type and Networking 中先选择Standalone MySQL server/Class MySQL Replication,下个页面ConfigType选择Development Machine其他默认。
- 设置密码
- Next直至Finish