1、进入mysql

# 用root账户登录禅道安装路径下的mysql
/opt/zbox/run/mysql/mysql -uroot -p
# 默认密码123456
Enter password:123456

2、成功进入mysql后

# 进入数据库
[root@cicd mysql]# /opt/zbox/run/mysql/mysql -uroot -p
Enter password:
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 4635
Server version: 10.7.6-MariaDB Source distribution

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

# 查看数据库
MariaDB [(none)]> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| mysql              |
| performance_schema |
| sys                |
| zentao             |
| zentaoep           |
| zentaomax          |
+--------------------+
7 rows in set (0.001 sec)

# 使用zentao库
MariaDB [(none)]> use zentao
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed

# 输入sql命令查看zt_user表root用户密码
MariaDB [zentao]> select id,account,password from zt_user where account = 'admin';
+----+---------+----------------------------------+
| id | account | password                         |
+----+---------+----------------------------------+
|  1 | admin   | 1019df4552b90e67be1091618c30f1d4 |
+----+---------+----------------------------------+
1 row in set (0.001 sec)

MariaDB [zentao]>

# 密码使用MD5加密,修改当前密码为:e10adc3949ba59abbe56e057f20f883e 即:123456
MariaDB [zentao]> update zt_user set password = 'e10adc3949ba59abbe56e057f20f883e' where id=1;
Query OK, 1 row affected (0.001 sec)
Rows matched: 1  Changed: 1  Warnings: 0

MariaDB [zentao]>