禅道修改默认数据库密码

环境:
OS:Centos 7
禅道版本:开源版本12.4.3

 

1.登录
默认密码登录
/opt/zbox/run/mysql/mysql -h localhost -uroot -p'123456'


MariaDB [(none)]> select user,host,password, authentication_string from mysql.user;
+-----------+----------------+
| user | host |
+-----------+----------------+
| root | 127.0.0.1 |
| root | ::1 |
| | localhost |
| root | localhost |
| zentao | localhost |
| | wyd621-virtual |
| root | wyd621-virtual |
+-----------+----------------+
8 rows in set (0.027 sec)

 

2.修改密码
update mysql.user set password=PASSWORD('mynewpasswd') where user='zentao' and host='localhost';
flush privileges;

不知道什么原因,root账号需要使用如下方法修改才可以
mysql> set password for root@localhost = password('mynewpasswd');
mysql> set password for root@'127.0.0.1' = password('mynewpasswd');
mysql> quit;

 

 

3.修改配置文件
/opt/zbox/app/zentao/config/my.php

[root@threegene-biz-yu0ajad-prd config]# more my.php
<?php
$config->installed = true;
$config->debug = false;
$config->requestType = 'PATH_INFO';
$config->db->host = '127.0.0.1';
$config->db->port = '3306';
$config->db->user = 'root';
$config->db->prefix = 'zt_';
$config->webRoot = getWebRoot();

$config->db->name = 'zentao';
$config->db->password = 'mynewpasswd';
$config->default->lang = 'zh-cn';

 

4.重启
/opt/zbox/zbox restart

 

posted @ 2023-01-28 13:40  slnngk  阅读(572)  评论(0编辑  收藏  举报