max_allowed_packet,我没有MySQL

时间:2022-10-15 06:00:23

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.

我在试着跑sonar-runner。bat,当它几乎完成分析时,它写的是max_allowed_packet而不是其他东西。所以它失败。

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

通过深入的调查,大家都说我应该照顾我自己。在MySQL文件夹内的ini文件。但是,我没有安装MySQL。

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!

我怎样才能改变它?的帮助!

2 个解决方案

#1


3  

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.

正如@Fabrice- SonarQube团队建议您在Mysql之上运行SonarQube服务器。如果你想检查,你可以在声纳里面检查。属性文件。

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

为了删除这些问题,您必须修改my.cnf(Linux)或my。ini(windows)。

[mysqld]

max_allowed_packet=256M

max_allowed_packet = 256

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

如果要全局设置相同的值。登录到Mysql并运行以下命令。

SET GLOBAL max_allowed_packet=1073741824;

Once you do this settings, Please restart Mysql Server.

完成此设置后,请重新启动Mysql服务器。

#2


0  

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.

sonarqube默认使用H2。这是一个很好的问题,我相信这样的问题不会发生。

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.

我公司的人用的是自己的MYSQL服务器。我找到了MySQL文件夹,更改。ini/。cfg文件,将MAX_ALLOWED_PACKET值插入到较大的数字。

VOILA!

瞧!

Thanks for your help!

谢谢你的帮助!

#1


3  

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.

正如@Fabrice- SonarQube团队建议您在Mysql之上运行SonarQube服务器。如果你想检查,你可以在声纳里面检查。属性文件。

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

为了删除这些问题,您必须修改my.cnf(Linux)或my。ini(windows)。

[mysqld]

max_allowed_packet=256M

max_allowed_packet = 256

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

如果要全局设置相同的值。登录到Mysql并运行以下命令。

SET GLOBAL max_allowed_packet=1073741824;

Once you do this settings, Please restart Mysql Server.

完成此设置后,请重新启动Mysql服务器。

#2


0  

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.

sonarqube默认使用H2。这是一个很好的问题,我相信这样的问题不会发生。

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.

我公司的人用的是自己的MYSQL服务器。我找到了MySQL文件夹,更改。ini/。cfg文件,将MAX_ALLOWED_PACKET值插入到较大的数字。

VOILA!

瞧!

Thanks for your help!

谢谢你的帮助!