Util 应用框架开发环境搭建(四)- 安装 数据库
安装 数据库
安装代码生成专用数据库.
Util 代码生成需要专用数据库.
本节使用 Docker 安装数据库.
如果你已有现成的数据库,请跳过该步骤.
Util 代码生成器支持的数据库类型
Sql Server
PostgreSql
MySql
目前代码生成支持上面三种数据库,你需要安装任意一种.
如果你的项目使用其它数据库,并且不想安装上面的数据库,请告知我们.
安装 Sql Server
使用 Docker 安装 Sql Server 服务器
创建 sqlserver-data 卷, 运行命令.
创建 Sql Server 容器, 运行命令.
容器名称: sqlserver
用户名: sa
密码: Pass@word
连接端口: 1433
安装成功后,Docker 容器列表出现 sqlserver 容器.

安装 Sql Server 客户端
打开 Sql Server Management Studio下载页面,找到 免费下载 SQL Server Management Studio (SSMS),点击下载.

下载完成, 运行 Sql Server Management Studio 安装包.

点击 安装 按钮.

Sql Server Management Studio 安装完成.
验证 Sql Server
下面使用 Sql Server Management Studio 连接 Sql Server 服务器,验证 Sql Server 数据库是否工作正常.
点击 Windows 开始菜单,打开 Sql Server Management Studio 客户端工具.

服务器名称: . 代表本机,默认端口为 1433,如果使用其它端口,服务器名称与端口之间使用逗号分隔,比如 .,5433 ,表示连接本机 5433 端口.
身份验证: 选择 Sql Server 身份验证
用户名: sa
密码: Pass@word
点击 连接 按钮,看到下图则说明连接成功.

安装 PostgreSql
使用 Docker 安装 PostgreSql 服务器
创建 pgsql-data 卷, 运行命令.
创建 PostgreSql 容器, 运行命令.
容器名称: pgsql
用户名: admin
密码: admin
连接端口: 5432
安装成功后,Docker 容器列表出现 pgsql 容器.

安装 PostgreSql 客户端
PostgreSql 客户端有很多选择,下面推荐两款常用工具.
这两款工具均支持多种数据库类型,请自行安装.
安装 MySql
使用 Docker 安装 MySql 服务器
创建 mysql-data 卷, 运行命令.
创建 MySql 容器, 运行命令.
容器名称: mysql
用户名: root
密码: admin
连接端口: 3306
安装成功后,Docker 容器列表出现 mysql 容器.

安装 MySql 客户端
MySql 客户端有很多选择,下面推荐两款常用工具.
这两款工具均支持多种数据库类型,请自行安装.
参考
Util 应用框架交流群: 24791014
评论