"记录在Linux环境下找回禅道admin密码的方法"
使用root账号登录禅道安装路径下的mysql,root默认密码123456
11 /opt/zbox/run/mysql/mysql -uroot -p 22 Enter password:
成功进入mysql后提示如下:
11 Welcome to the MariaDB monitor. Commands end with ; or \g.Your MariaDB connection id is 7Server version: 10.1.22-MariaDB Source distribution 22 Copyright (c) 2000, 2016, Oracle, MariaDB Corporation Ab and others. 33 Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. 44 MariaDB [(none)]>
查看数据库,并使用zentao库
1 1 MariaDB [(none)]> show databases; 2 2 +--------------------+ 3 3 | Database | 4 4 +--------------------+ 5 5 | information_schema | 6 6 | mysql | 7 7 | performance_schema | 8 8 | zentao | 9 9 | zentaoep | 1010 | zentaopro | 1111 +--------------------+ 1212 6 rows in set (0.01 sec) 1313 1414 MariaDB [(none)]> use zentao; 1515 Reading table information for completion of table and column names 1616 You can turn off this feature to get a quicker startup with -A 1717 1818 Database changed 1919 MariaDB [zentao]>
输入sql命令查看zt_user表root用户密码
11 MariaDB [zentao]> select id,account,password from zt_user where account ='admin'; 22 +----+---------+----------------------------------+ 33 | id | account | password | 44 +----+---------+----------------------------------+ 55 | 1 | admin | c79077fb2a0b06ae6ccf62ddc7269026 | 66 +----+---------+----------------------------------+ 77 1 row in set (0.00 sec) 88 MariaDB [zentao]>
密码使用MD5加密,修改当前密码为:
e10adc3949ba59abbe56e057f20f883e即123456
11 MariaDB [zentao]> update zt_user set password='e10adc3949ba59abbe56e057f20f883e' where id=1; 22 Query OK, 1 row affected (0.00 sec) 33 Rows matched: 1 Changed: 1 Warnings: 0 44 55 MariaDB [zentao]>
修改成功后即可使用密码123456在浏览器登录禅道admin账号。