HiveBrain v1.2.0
Get Started
← Back to all entries
patternsqlMinor

Max Connections Maria DB

Submitted by: @import:stackexchange-dba··
0
Viewed 0 times
maxconnectionsmaria

Problem

Every time I reboot Mariadb places me the max_connections in 151 and in the my.cnf I have it with 300. Why does this happen?

Solution

This depend if you set max_connections under the correct section inside my.cnf. what do you need to check(with examples)

  • go to MySQL Directory cd /opt/mysql



  • edit my.cnf using any text editor sudo vi my.cnf



  • search for [mysqld]



  • add the following lines directly under it max_connections=300



  • save and quit



  • restart the services.



Don't want a downtime?

  • connect to MySQL using root user mysql -u root -p



  • SET GLOBAL max_connections=300;



  • quit

Context

StackExchange Database Administrators Q#241683, answer score: 5

Revisions (0)

No revisions yet.