*SOLVED* Znuny LTS 6.0.43 MariaDB 10.5.15 adjust the max_allowed_packet setting

Moderator: crythias

Post Reply
captntano
Znuny newbie
Posts: 4
Joined: 18 May 2022, 09:09
Znuny Version: 6.0.43
Real Name: captnstabbn

*SOLVED* Znuny LTS 6.0.43 MariaDB 10.5.15 adjust the max_allowed_packet setting

Post by captntano »

hey,
I have problems to set the max_allowed_packet Znuny LTS 6.0.43 with MariaDB 10.5.15.
package manager shows following massage,
Make sure your database accepts packets over 64MB (Currently it only accepts packets up to 16MB). Please adjust the max_allowed_packet setting to your database configuration to avoid errors.

First I configured /etc/mysql/my.cnf

Code: Select all

# The MariaDB configuration file
#
# The MariaDB/MySQL tools read configuration files in the following order:
# 0. "/etc/mysql/my.cnf" symlinks to this file, reason why all the rest is read.
# 1. "/etc/mysql/mariadb.cnf" (this file) to set global defaults,
# 2. "/etc/mysql/conf.d/*.cnf" to set global options.
# 3. "/etc/mysql/mariadb.conf.d/*.cnf" to set MariaDB-only options.
# 4. "~/.my.cnf" to set user-specific options.
#
# If the same option is defined multiple times, the last one will apply.
#
# One can use all long options that the program supports.
# Run program with --help to get a list of available options and with
# --print-defaults to see which it would actually understand and use.
#
# If you are new to MariaDB, check out https://mariadb.com/kb/en/basic-mariadb-articles/

#
# This group is read both by the client and the server
# use it for options that affect everything
#
[mysqld]
max_allowed_packet = 512M
query_cache_size = 64M
innodb_log_file_size = 256M
character-set-server = utf8
collation-server = utf8_unicode_ci
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
[client-server]
# Port or socket location where to connect
# port = 3306
socket = /run/mysqld/mysqld.sock
# Import all .cnf files from configuration directory
!includedir /etc/mysql/conf.d/
!includedir /etc/mysql/mariadb.conf.d/
However, no changes were adopted.
So I configured /etc/mysql/mariadb.cnf

Code: Select all

# The MariaDB configuration file
#
# The MariaDB/MySQL tools read configuration files in the following order:
# 0. "/etc/mysql/my.cnf" symlinks to this file, reason why all the rest is read.
# 1. "/etc/mysql/mariadb.cnf" (this file) to set global defaults,
# 2. "/etc/mysql/conf.d/*.cnf" to set global options.
# 3. "/etc/mysql/mariadb.conf.d/*.cnf" to set MariaDB-only options.
# 4. "~/.my.cnf" to set user-specific options.
#
# If the same option is defined multiple times, the last one will apply.
#
# One can use all long options that the program supports.
# Run program with --help to get a list of available options and with
# --print-defaults to see which it would actually understand and use.
#
# If you are new to MariaDB, check out https://mariadb.com/kb/en/basic-mariadb-articles/

#
# This group is read both by the client and the server
# use it for options that affect everything
#
[mysqld]
max_allowed_packet = 512M
query_cache_size = 64M
innodb_log_file_size = 256M
character-set-server = utf8
collation-server = utf8_unicode_ci
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
[client-server]
# Port or socket location where to connect
# port = 3306
socket = /run/mysqld/mysqld.sock
# Import all .cnf files from configuration directory
!includedir /etc/mysql/conf.d/
!includedir /etc/mysql/mariadb.conf.d/

didn't change anything either.
at least I tried to set global max_allowed_packet to 445878
but the value stays the same.

Code: Select all

MariaDB [(none)]> set global max_allowed_packet=445878;
Query OK, 0 rows affected, 1 warning (0.000 sec)
root@ubuntuotrs:/# sudo service mysql restart
MariaDB [(none)]> show variables like 'max_allowed_packet';
+--------------------+----------+
| Variable_name      | Value    |
+--------------------+----------+
| max_allowed_packet | 16777216 |
+--------------------+----------+
1 row in set (0.002 sec)
Does anyone have any ideas what else I could do?
Last edited by captntano on 20 May 2022, 09:34, edited 1 time in total.
skullz
Znuny superhero
Posts: 621
Joined: 24 Feb 2012, 03:58
Znuny Version: LTS and Features
Real Name: Mo Azfar
Location: Kuala Lumpur, MY
Contact:

Re: Znuny LTS 6.0.43 MariaDB 10.5.15 adjust the max_allowed_packet setting

Post by skullz »

Restart mariadb?
captntano
Znuny newbie
Posts: 4
Joined: 18 May 2022, 09:09
Znuny Version: 6.0.43
Real Name: captnstabbn

Re: Znuny LTS 6.0.43 MariaDB 10.5.15 adjust the max_allowed_packet setting

Post by captntano »

skullz wrote: 18 May 2022, 20:18 Restart mariadb?
after every change I did a restart with systemctl restart mariadb
skullz
Znuny superhero
Posts: 621
Joined: 24 Feb 2012, 03:58
Znuny Version: LTS and Features
Real Name: Mo Azfar
Location: Kuala Lumpur, MY
Contact:

Re: Znuny LTS 6.0.43 MariaDB 10.5.15 adjust the max_allowed_packet setting

Post by skullz »

captntano wrote: 19 May 2022, 02:12
skullz wrote: 18 May 2022, 20:18 Restart mariadb?
after every change I did a restart with systemctl restart mariadb
Try /etc/mysql/mariadb.conf.d/50-znuny_config.cnf

REF: https://doc.znuny.org/manual/releases/i ... figuration

Code: Select all

[client]
max_allowed_packet=64M

[mysqld]
max_allowed_packet=64M
query_cache_size=32M
innodb_file_per_table
innodb_log_file_size = 256M
character-set-server=utf8
collation-server = utf8_unicode_ci

captntano
Znuny newbie
Posts: 4
Joined: 18 May 2022, 09:09
Znuny Version: 6.0.43
Real Name: captnstabbn

Re: Znuny LTS 6.0.43 MariaDB 10.5.15 adjust the max_allowed_packet setting

Post by captntano »

hey thanks for help ,
so I tried /etc/mysql/mariadb.conf.d/50-znuny_config.cnf

Code: Select all

GNU nano 4.8     /etc/mysql/mariadb.conf.d/50-znuny_config.cnf                

[client]
max_allowed_packet=64M

[mysqld]
max_allowed_packet=64M
query_cache_size=32M
innodb_file_per_table
innodb_log_file_size = 256M
character-set-server=utf8
collation-server = utf8_unicode_ci
and again it doesnt change anything , its still max_allowed_packet=16777216

MariaDB [(none)]> SELECT @@max_allowed_packet;
+----------------------+
| @@max_allowed_packet |
+----------------------+
| 16777216 |
+----------------------+
1 row in set (0.000 sec)



*edit
FIXED , I just had to do this --> chmod 644 /etc/mysql/my.cnf
and it works -.-
Post Reply