1.3 创建gitea用户和数据库:
在数据库服务器上,执行以下脚本
sudo mysql -u root -p
然后依次执行以下sql语句
SET old_passwords=0;
CREATE USER 'gitea'@'10.32.210.236' IDENTIFIED BY 'giteap'; --10.32.210.236是准备安装gitea的服务器IP,giteap是gitea账号的密码
CREATE DATABASE giteadb CHARACTER SET 'utf8mb4' COLLATE 'utf8mb4_unicode_ci';
GRANT ALL PRIVILEGES ON giteadb.* TO 'gitea'@'10.32.210.236';
FLUSH PRIVILEGES;