mysql - 无法登录 Sonar

标签 mysql sonarqube sonarqube5.1

我正在尝试在我的电脑中设置 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/

相关文章:

Maven 在 Jenkins 中抛出 "Cannot find symbol"

SonarQube jenkins 要求输入登录名和密码

mysql - 像连接字段上的 SQL?

mysql - 当我运行 app.js 时,它显示错误 "TypeError: knex.select is not a function"

java - 无法找到对此进行冗余空检查的原因,该检查已知为非空

.net-core - Azure Devops + Coverlet + SonarQube 显示 0%

mysql - 内存消耗和正确的数据库设计

php - 优化我的搜索引擎

sonarqube - 跟踪 SonarQube 扫描的来源

sonarqube - 使用 SonarQube 进行多模块项目分析