This commit is contained in:
makeyangcom
2024-03-06 16:40:13 +08:00
parent be2884f48b
commit 2501637568
2 changed files with 40 additions and 2 deletions

View File

@@ -29,6 +29,5 @@ fi
# 安装Redis、MySQL数据库
if [ ! -d "/data/mysql" ]; then
wget -c http://mirrors.oneinstack.com/oneinstack-full.tar.gz && tar xzf oneinstack-full.tar.gz && ./oneinstack/install.sh --db_option 2 --dbinstallmethod 1 --dbrootpwd 88888888 --redis
sudo rm -rf oneinstack-full.tar.gz
sudo rm -rf oneinstack*
fi

View File

@@ -1,3 +1,42 @@
## 第二课
> 第一课时操作引导文档。
> 第二课时操作引导文档。
### GoLand编辑器配置
```shell
# 配置代理,加速依赖库的下载
GOPROXY=https://goproxy.io,direct
```
### 数据库管理工具
> 创建名为`database`的数据库
```shell
database
```
> 执行下面的MySQL脚本创建游戏玩家数据表
```mysql
CREATE TABLE `game_play_data` (
`user_id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '编号',
`user_server_id` int(11) NOT NULL DEFAULT '0' COMMENT '服务器编号',
`user_account` varchar(140) NOT NULL DEFAULT '' COMMENT '账号',
`user_password` varchar(50) NOT NULL DEFAULT '' COMMENT '密码',
`user_name` varchar(50) NOT NULL DEFAULT '' COMMENT '真实姓名',
`user_number` varchar(140) NOT NULL DEFAULT '' COMMENT '身份证号码',
`user_question_a` varchar(140) NOT NULL DEFAULT '' COMMENT '问题一',
`user_question_b` varchar(140) NOT NULL DEFAULT '' COMMENT '问题二',
`user_answer_a` varchar(140) NOT NULL DEFAULT '' COMMENT '答案一',
`user_answer_b` varchar(140) NOT NULL DEFAULT '' COMMENT '答案二',
`user_status` tinyint(2) NOT NULL DEFAULT '2' COMMENT '状态 1停用 2启用',
`create_at` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间',
`update_at` int(11) NOT NULL DEFAULT '0' COMMENT '更新时间',
`delete_at` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`user_id`),
KEY `status` (`user_status`),
KEY `server_id` (`user_server_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COMMENT='游戏用户数据表';
```