max_allowed_packet, I don't have MySQL

倖福魔咒の 提交于 2019-12-13 08:18:53

问题


I'm trying to run sonar-runner.bat, when it almost finished analyzing, it's written max_allowed_packet more than something something. So it fails.

Through deep search, everyone said that i should configer my.ini file inside MySQL folder. But, I don't have MySQL Installed.

Log: Error: unable to execute sonar error: caused by: unable to save file sources error: caused by:

Error updating database. cause: com.mysql.jdbc.packettoobigexception: packet for query is too large (3215747 >1048576). you can change this..bla..bla

the error may involve org.sonar.core.source.db.filesourcemapper.insert-inline

the error occurred while setting parameters

how can i change it? help!


回答1:


As @Fabrice- SonarQube Team suggested that you are running SonarQube Server on top of Mysql. If you want to check you can check within Sonar.properties file.

for removing this issues you have to modify the my.cnf(Linux) or my.ini(for windows).

[mysqld]

max_allowed_packet=256M

if you want to set the same Globally.Log in to Mysql and run the following command.

SET GLOBAL max_allowed_packet=1073741824;

Once you do this settings, Please restart Mysql Server.




回答2:


I found the answer myself.

Looks like I don't realize how the database works in Sonarqube.

So by DEFAULT, sonarqube use H2. This is a good one, and I believe such my problem won't happened.

Turned out someone from my company actually used his own MYSQL server. So, I found the MySQL folder, change .ini/.cfg file, insert MAX_ALLOWED_PACKET value to bigger number.

VOILA!

Thanks for your help!



来源:https://stackoverflow.com/questions/30862537/max-allowed-packet-i-dont-have-mysql

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!