gpt4 book ai didi

mysql - 连接到 MySQL 时 SonarQube 未启动

转载 作者:行者123 更新时间:2023-12-02 14:38:18 25 4
gpt4 key购买 nike

如果我不将 MySql 数据库连接到 Sonar,Web UI 可以在 localhost:9000 上加载没有问题。如果我更新 MySQL 的配置文件,网络将无法启动,但我无法从日志中看到提示。

Sonar .属性:

# User credentials.
# Permissions to create tables, indices and triggers must be granted to JDBC user.
# The schema must be created first.
sonar.jdbc.username=sonarqube
sonar.jdbc.password=password
#----- Embedded Database (default)
# H2 embedded database server listening port, defaults to 9092
# sonar.embeddedDatabase.port=9092
#----- MySQL 5.6 or greater
# Only InnoDB storage engine is supported (not myISAM).
# Only the bundled driver is supported. It can not be changed.
sonar.jdbc.url=jdbc:mysql://localhost:3306/sonar?useUnicode=true&characterEncoding=utf8&rewriteBatchedStatements=true&useConfigs=maxPerformance&useSSL=false

日志:

--> Wrapper Started as Console
Launching a JVM...
Wrapper (Version 3.2.3) http://wrapper.tanukisoftware.org
Copyright 1999-2006 Tanuki Software, Inc. All Rights Reserved.

2017.01.04 19:38:08 INFO app[][o.s.a.AppFileSystem] Cleaning or creating temp directory C:\Program Files (x86)\sonarqube-6.2\temp
2017.01.04 19:38:08 INFO app[][o.s.p.m.JavaProcessLauncher] Launch process[es]: C:\Program Files\Java\jre1.8.0_101\bin\java -Djava.awt.headless=true -Xmx1G -Xms256m -Xss256k -Djna.nosys=true -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -XX:+HeapDumpOnOutOfMemoryError -Djava.io.tmpdir=C:\Program Files (x86)\sonarqube-6.2\temp -javaagent:C:\Program Files\Java\jre1.8.0_101\lib\management-agent.jar -cp ./lib/common/*;./lib/search/* org.sonar.search.SearchServer C:\Program Files (x86)\sonarqube-6.2\temp\sq-process2983841696812955615properties
2017.01.04 19:38:21 INFO app[][o.s.p.m.Monitor] Process[es] is up
2017.01.04 19:38:21 INFO app[][o.s.p.m.JavaProcessLauncher] Launch process[web]: C:\Program Files\Java\jre1.8.0_101\bin\java -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djruby.management.enabled=false -Djruby.compile.invokedynamic=false -Xmx512m -Xms128m -XX:+HeapDumpOnOutOfMemoryError -Djava.io.tmpdir=C:\Program Files (x86)\sonarqube-6.2\temp -javaagent:C:\Program Files\Java\jre1.8.0_101\lib\management-agent.jar -cp ./lib/common/*;./lib/server/*;C:\Program Files (x86)\sonarqube-6.2\lib\jdbc\mysql\mysql-connector-java-5.1.39.jar org.sonar.server.app.WebServer C:\Program Files (x86)\sonarqube-6.2\temp\sq-process7994513818856510085properties
2017.01.04 19:38:25 INFO app[][o.s.p.m.Monitor] Process[es] is stopping
2017.01.04 19:38:25 ERROR app[][o.s.p.m.Monitor] Process[web] failed to start
2017.01.04 19:38:26 INFO app[][o.s.p.m.Monitor] Process[es] is stopped
<-- Wrapper Stopped

最佳答案

我连接到 MySQL 数据库中的错误架构。我已将我的用户设置为使用 sonarqube 架构。

不正确:

jdbc:mysql://localhost:3306/ Sonar ?useUnicode=true&characterEncoding=utf8&rewriteBatchedStatements=true&useConfigs=maxPerformance&useSSL=false

正确:

sonar.jdbc.url=jdbc:mysql://localhost:3306/sonarqube?useUnicode=true&characterEncoding=utf8&rewriteBatchedStatements=true&useConfigs=maxPerformance&useSSL=false

关于mysql - 连接到 MySQL 时 SonarQube 未启动,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41475568/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com