Details
-
Bug
-
Status: Closed (View Workflow)
-
Minor
-
Resolution: Not a Bug
-
10.1.12
-
None
-
CentOS 7 VM
Mariadb 10.1.12
Description
Hi
I changed max_connection in /etc/my.cnf on CentOS 7 but it not work
Could you guide me why?
Thanks!
My OS is Centos 7
[root@localhost ~]# uname -a
|
Linux localhost.localdomain 3.10.0-327.el7.x86_64 #1 SMP Thu Nov 19 22:10:57 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
|
|
[root@localhost ~]# lsb_release -a
|
LSB Version: :core-4.1-amd64:core-4.1-noarch
|
Distributor ID: CentOS
|
Description: CentOS Linux release 7.2.1511 (Core)
|
Release: 7.2.1511
|
Codename: Core
|
|
Mariadb version is 10.1.12
|
[root@localhost ~]# rpm -qa | grep mariadb
|
mariadb-10.1.12-4.el7.x86_64
|
mariadb-server-10.1.12-4.el7.x86_64
|
mariadb-errmsg-10.1.12-4.el7.x86_64
|
mariadb-config-10.1.12-4.el7.x86_64
|
mariadb-common-10.1.12-4.el7.x86_64
|
mariadb-libs-10.1.12-4.el7.x86_64
|
[root@localhost ~]# cat /etc/my.cnf
|
[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
|
|
# Added for Openstack
|
bind-address = 172.16.7.195
|
default-storage-engine = innodb
|
innodb_file_per_table
|
collation-server = utf8_general_ci
|
character-set-server = utf8
|
|
max_connections = 500
|
|
[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
|
MariaDB [(none)]> show variables like 'max_connections'; |
+-----------------+-------+ |
| Variable_name | Value |
|
+-----------------+-------+ |
| max_connections | 214 |
|
+-----------------+-------+ |
1 row in set (0.00 sec) |
Attachments
Activity
Field | Original Value | New Value |
---|---|---|
Description |
Hi
I changed max_connection in /etc/my.cnf on CentOS 7 but it not work Could you guide me why? Thanks! My OS is Centos 7 [root@localhost ~]# uname -a Linux localhost.localdomain 3.10.0-327.el7.x86_64 #1 SMP Thu Nov 19 22:10:57 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux [root@localhost ~]# lsb_release -a LSB Version: :core-4.1-amd64:core-4.1-noarch Distributor ID: CentOS Description: CentOS Linux release 7.2.1511 (Core) Release: 7.2.1511 Codename: Core Mariadb version is 10.1.12 [root@localhost ~]# rpm -qa | grep mariadb mariadb-10.1.12-4.el7.x86_64 mariadb-server-10.1.12-4.el7.x86_64 mariadb-errmsg-10.1.12-4.el7.x86_64 mariadb-config-10.1.12-4.el7.x86_64 mariadb-common-10.1.12-4.el7.x86_64 mariadb-libs-10.1.12-4.el7.x86_64 [root@localhost ~]# cat /etc/my.cnf [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 # Added for Openstack bind-address = 172.16.7.195 default-storage-engine = innodb innodb_file_per_table collation-server = utf8_general_ci character-set-server = utf8 max_connections = 500 [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 MariaDB [(none)]> show variables like 'max_connections'; +-----------------+-------+ | Variable_name | Value | +-----------------+-------+ | max_connections | 214 | +-----------------+-------+ 1 row in set (0.00 sec) |
Hi
I changed max_connection in /etc/my.cnf on CentOS 7 but it not work Could you guide me why? Thanks! My OS is Centos 7 {code:sh} [root@localhost ~]# uname -a Linux localhost.localdomain 3.10.0-327.el7.x86_64 #1 SMP Thu Nov 19 22:10:57 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux [root@localhost ~]# lsb_release -a LSB Version: :core-4.1-amd64:core-4.1-noarch Distributor ID: CentOS Description: CentOS Linux release 7.2.1511 (Core) Release: 7.2.1511 Codename: Core Mariadb version is 10.1.12 [root@localhost ~]# rpm -qa | grep mariadb mariadb-10.1.12-4.el7.x86_64 mariadb-server-10.1.12-4.el7.x86_64 mariadb-errmsg-10.1.12-4.el7.x86_64 mariadb-config-10.1.12-4.el7.x86_64 mariadb-common-10.1.12-4.el7.x86_64 mariadb-libs-10.1.12-4.el7.x86_64 {code} {noformat} [root@localhost ~]# cat /etc/my.cnf [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 # Added for Openstack bind-address = 172.16.7.195 default-storage-engine = innodb innodb_file_per_table collation-server = utf8_general_ci character-set-server = utf8 max_connections = 500 [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 {noformat} {code:sql} MariaDB [(none)]> show variables like 'max_connections'; +-----------------+-------+ | Variable_name | Value | +-----------------+-------+ | max_connections | 214 | +-----------------+-------+ 1 row in set (0.00 sec) {code} |
Labels | need_feedback |
Labels | need_feedback |
Component/s | OTHER [ 10125 ] | |
Fix Version/s | N/A [ 14700 ] | |
Resolution | Not a Bug [ 6 ] | |
Status | Open [ 1 ] | Closed [ 6 ] |
Workflow | MariaDB v3 [ 76018 ] | MariaDB v4 [ 150524 ] |
max_connections, as well as some other variables, are auto-sized in a not-very-obvious-way based on the max number of open files which your server was run with. Try to increase it. You can pass it to mysqld_safe via --open-files-limit=count, but of course the hard limit should allow the value you are trying to set.