mlogclub / bbs-go

基于Golang的开源社区系统。简洁对话,高效互动,社区新体验!
https://bbs-go.com
GNU General Public License v3.0
2.98k stars 615 forks source link

error to init MySQL Database #203

Open Mr-Ao-Dragon opened 1 year ago

Mr-Ao-Dragon commented 1 year ago

MySQL Version:8.0 error sql:

INSERT INTO t_user (`id`, `username`, `nickname`, `avatar`, `email`, `password`, `status`, `create_time`, `update_time`,
                    `roles`, `description`, `topic_count`, `comment_count`, `score`, `follow_count`, `fans_count`)
SELECT 1,
       'admin',
       'bbsgo站长',
       '',
       'a@example.com',
       '$2a$10$ofA39bAFMpYpIX/Xiz7jtOMH9JnPvYfPRlzHXqAtLPFpbE/cLdjmS',
       0,
       (UNIX_TIMESTAMP(now()) * 1000),
       (UNIX_TIMESTAMP(now()) * 1000),
       'owner',
       '轻轻地我走了,正如我轻轻的来。',
       0,
       0,
       0,
       0,
       0
FROM DUAL
WHERE NOT EXISTS(SELECT * FROM `t_user` WHERE `id` = 1);

error code: 1045 1680450743728.png

musclejack commented 1 year ago

老哥有解决吗