MySQL maximum number of concurrent connections modified under Linux

Source: Internet
Author: User
Tags ssh server

Enter the following command:

/usr/local/mysql/bin/mysqladmin-uroot-pyyyyyy variables |grep max_connections

Nano/etc/my.cnf

max_connections=200

Service MySQL Restart

The maximum number of concurrent connections in MySQL modification method as long as in the my.cnf file plus find max_connections or modify the Max_connections reference can be, the larger the parameter later is the concurrency of the greater

1. First check the maximum number of connections currently MySQL note that Root is replaced with your database, but the general default is Root,password is the database password, the above command will display the following information, this is the maximum number of connections is 100

[Email protected] ~]#/usr/local/mysql/bin/mysqladmin-uroot-pyyyyyyyy variables |grep max_connections

2. Modify the maximum number of connections to 200

[Email protected] ~]# NANO/ETC/MY.CNF

Entering the above command will enter the contents of the My.cnf file, in which the following line of code is added

max_connections=200

Use the up and down arrows to move the cursor, enter and press Ctrl+o after the key to save, save the time to press ENTER to determine, OK, press ctrl+x to exit the command line

3. The final step is to restart MySQL [[email protected] ~]# service MySQL restart//restart MySQL command

The Linux command interface is as follows:

Xshell for Xmanager Enterprise 5 (Build 0488) Copyright (c) 2002-2014 Netsarang Computer, Inc. All rights reserved.

Type ' help ' to learn. Xshell prompt. [c:\~]$

Connecting to 203.86.8.114:22 ... Connection established. To escape to local shell, press ' ctrl+alt+] '.

warning! The remote SSH server rejected X11 forwarding request. Last login:wed 17:25:35 from 61.143.61.19 [[email protected] ~]#/usr/local/mysql/bin/mysqladmin-uroot-pyyyyyy variables |grep max_connections | max_connections                          | 10                                                                                           

| [Email protected] ~]# nano/etc/my.cnf

[Email protected] ~]#/usr/local/mysql/bin/mysqladmin-uroot-pzhengou$% #1980 variables |grep max_connections error: Found option without preceding group in config file:/etc/my.cnf at Line:3 Fatal error in defaults handling. Program Aborted/usr/local/mysql/bin/mysqladmin:connect to server at ' localhost ' failed error: ' Too many connections '

[Email protected] ~]#Service MySQL Restart Error:found option without preceding group in config file:/etc/my.cnf at Line:3 Fatal error in defaults handling. Program aborted error:found option without preceding group in config file:/etc/my.cnf at Line:3 Fatal Error in defaults Handling. Program aborted error:found option without preceding group in config file:/etc/my.cnf at Line:3 Fatal Error in defaults Handling. Program aborted error:found option without preceding group in config file:/etc/my.cnf at Line:3 Fatal Error in defaults Handling. Program aborted shutting-down MySQL.                                         [OK] error:found option without preceding group in config file:/etc/my.cnf at Line:3 Fatal error in Defaults Han Dling. Program aborted error:found option without preceding group in config file:/etc/my.cnf at Line:3 FaTal Error in defaults handling. Program aborted starting mysql.                                              [OK]

[Email protected] ~]#/usr/local/mysql/bin/mysqladmin-uroot-pyyyyyyy variables |grep max_connections error:found Opti On without preceding group in config file:/etc/my.cnf @ line:3 Fatal error in defaults handling. Program Aborted | max_connections | 151 |

[Email protected] ~]# NANO/ETC/MY.CNF

GNU Nano 1.3.12 File:/etc/my.cnf

max_connections=200

# Example MySQL config file for medium systems. #-IS-a system with little memory (32m-64m) where MySQL PLA YS # An important part, or systems up to 128M where MySQL was used together with # Other programs (such as a Web server) # # MySQL programs look for option files in a set of # locations which depend on the deployment platform. # can copy this option file to one of those # locations. For information about these locations, see: # http://dev.mysql.com/doc/mysql/en/option-files.html # # # # of this file, you CA n Use all long options, a program supports. # If you want to know which options a program supports, run the program # with the "--help" option.

# The following options would be passed to all MySQL clients [client] [Read 146 lines ] ^g Get help ^o writeout ^r Read File ^y Prev Page ^k Cut Text ^c Cur Pos ^x Exit ^j Justify ^w W Here's ^v Next Page ^u UnCut Text ^t to Spell

MySQL maximum number of concurrent connections modified under Linux

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.