n9e-helm icon indicating copy to clipboard operation
n9e-helm copied to clipboard

使用helm安装,使用外部MySQL库,没有新建表

Open kazu12 opened this issue 1 year ago • 3 comments

helm安装,MySQL使用外部数据库,database下没有新建表指令,导致n9e主实例崩溃。 `runner.cwd: /app runner.hostname: n9e-nightingale-center-6bb5866f77-pxsh5 runner.fd_limits: (soft=1048576, hard=1048576) runner.vm_limits: (soft=unlimited, hard=unlimited)

2023/05/25 11:13:34 /home/runner/work/nightingale/nightingale/models/user.go:179 Error 1146: Table 'n9e_v6.users' doesn't exist [0.845ms] [rows:0] SELECT * FROM users WHERE username='root' `

kazu12 avatar May 25 '23 03:05 kazu12

内部数据库是利用pod启动时创建db。helm不管理外部数据库,只是连接,写入等。

kongfei605 avatar May 25 '23 05:05 kongfei605

请问能提供建表SQL语句吗?

修改values.yaml。使用内部MySQL,MySQL出现另外一个问题:

2023-05-25 14:16:22+08:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 5.7.36-1debian10 started. 2023-05-25 14:16:22+08:00 [Note] [Entrypoint]: Initializing database files 2023-05-25T06:16:22.373507Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details). 2023-05-25T06:16:22.374717Z 0 [ERROR] --initialize specified but the data directory has files in it. Aborting. 2023-05-25T06:16:22.374733Z 0 [ERROR] Aborting

kazu12 avatar May 25 '23 06:05 kazu12

建表的sql都在夜莺的repo中 ,可以在夜莺中找 https://github.com/ccfos/nightingale/tree/main/docker/initsql

kongfei605 avatar Jul 24 '23 02:07 kongfei605