我正在尝试在我的电脑中设置 Sonar 。
遵循与官方文档完全相同的步骤。 我将数据库更改为mysql,端口更改为4950。
sonar.web.port=4950
sonar.jdbc.username=sonar
sonar.jdbc.password=root
sonar.jdbc.url=jdbc:mysql://localhost:3306/sonar?useUnicode=true&characterEncoding=utf8&rewriteBatchedStatements=true&useConfigs=maxPerformance
现在我可以在端口 4950 访问 Sonar ,mysql 包含一个用户表,其中有一行管理员,但我无法使用管理员凭据登录。
我恢复到其嵌入式数据库,但仍然无法使用管理员凭据登录。是否需要设置任何属性,或者我是否遗漏了某些内容。请帮忙
最佳答案
The docs包括有关 admin
何时被锁定的建议。简而言之,您可能需要运行一些 SQL:
INSERT INTO user_roles(user_id, role) VALUES ((select id from users where login='mylogin'), 'admin');
关于mysql - 无法登录 Sonar ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37722264/