2

I'm having some troubles setting MySql (mariadb running on CentOS7) When I issue

 show global variables where variable_name = 'max_allowed_packet';

The response is

 +--------------------+---------+
 | Variable_name      | Value   |
 +--------------------+---------+
 | max_allowed_packet | 1048576 |
 +--------------------+---------+
 1 row in set (0.00 sec)     

Witch means that it is 1M. I need to leave permanently this value at 5M or bigger I tried editing the file /etc/my.cnf by adding

[mysqldump]
max_allowed_packet=16M

So it remained like this.

[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=0
# Settings user and group are ignored when systemd is used.
# If you need to run mysqld under a different user or group,
# customize your systemd unit file for mariadb according to the
# instructions in http://fedoraproject.org/wiki/Systemd
[mysqldump]
max_allowed_packet=16M

[mysqld_safe]
log-error=/var/log/mariadb/mariadb.log
pid-file=/var/run/mariadb/mariadb.pid
#
# include all files from the config directory
#
!includedir /etc/my.cnf.d

But after restarting the server it looks like the max_allowed_packet = 1048576 Any suggestion please?. Thanks in advance.

mdev
  • 472
  • 7
  • 18
  • Looks like if the file /etc/my.cnf was ignored by the server. I added a line like "dfgdfgdfg" but it does not mariadb to start. – mdev Mar 21 '15 at 04:02
  • Maybe it just use another config file. Take a look at http://stackoverflow.com/questions/580331/determine-which-config-file-is-being-used – Kostia Shiian Mar 21 '15 at 05:43
  • Yep. May be. Or simply is ignoring it. That's not a normal behavior. All docs I found speak about that file. I finally gave up and changed to Fedora (The jewels of digitalocean.com) where I am able to install a .rpm directly from oracle. It works fine. Thanks for your comment. Best regards. – mdev Mar 21 '15 at 07:38

1 Answers1

2

I finally could solve this particular problem.

We are talking about a droplet in DigitalOcean. After the doplet creation I just followed a tutorial and issued a "yum install mariadb" (Or may be mariadb-server, not sure). It seemed to be ignoring all configuration in /etc/my.cnf so I tried a Fedora droplet. I was able to install MySql from an Oracle YUM repository. Everything was fine. But I will talk about a problem on Fedora in another question (Or may be submit a ticket).

What I did is to visit mariadb official site and following some instructions i arrived to this page. https://downloads.mariadb.org/mariadb/repositories/#mirror=edatel&distro=CentOS&distro_release=centos7-amd64--centos7&version=10.0 So setting up the official mariadb resppository and then issuing "yum install mariaDB" seemed to fix the problem.

Thats all for now. Thank you all for reading.

mdev
  • 472
  • 7
  • 18