环境:CentOS7
禅道:18.2
1、创建'root'@'%'用户,并授权
cd /opt/zbox/run/mysql/
./mysql -u root
./mysql -u root -p #默认密码123456
MariaDB [(none)]> use mysql
MariaDB [mysql]> select user,authentication_string,host from user;
MariaDB [mysql]> update user set host = '%' where user = 'root';
ERROR 1356 (HY000): View 'mysql.user' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
MariaDB [mysql]> CREATE USER 'root'@'%' IDENTIFIED BY '123456';
MariaDB [mysql]> select user,authentication_string,host from user;
MariaDB [mysql]> grant all privileges on *.* to 'root'@'%' with grant option;
2、打开防火墙端口3306
firewall-cmd --permanent --zone=public --add-port=3306/tcp
firewall-cmd --reload
CentOS 7 防火墙配置,添加规则,删除规则,查看规则_centos7删除防火墙规则
3、my.cnf修改mysql绑定的IP
/opt/zbox/etc/mysql/my.cnf
注释掉
#bind-address = 127.0.0.1
或改为
bind-address = 0.0.0.0
4、重启禅道服务
/opt/zbox/zbox restart
/opt/zbox/zbox stop
/opt/zbox/zbox start
参考: