数据库的配置,使用gogs自带的script里面的mysql完成数据库的配置

## 在数据库中创建一个gogs用户,赋予权限并刷新,注意密码需要符合自己设置的密码规则
create user 'gogs'@'localhost' identified by 'gogspassword';
grant all privileges on gogs.* to 'gogs'@'localhost';

切换到gogs/script下运行

mysql -u root -p < mysql.sql