- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How to set max_connections in MySQL Programmatically?
To set max_connections in MySQL programmatically, you can use SET command. The syntax is as follows −
SET GLOBAL max_connections=yourIntegerValue;
Let us implement the above query to set maximum connections. The query is as follows −
mysql> set global max_connections=1000; Query OK, 0 rows affected (0.04 sec)
Check maximum connections are set or not, using the show variables command. The query is as follows.
mysql> show variables like 'max_connections';
The following is the output.
+-----------------+-------+ | Variable_name | Value | +-----------------+-------+ | max_connections | 1000 | +-----------------+-------+ 1 row in set (0.18 sec)
Advertisements
To Continue Learning Please Login
Login with Google