# How to Change MySQL Max Connection via xCloud?

> Learn how to change MySQL max connections on your xCloud server. Follow simple steps to optimize performance and handle heavy traffic.

[**xCloud**](/) lets you optimize your server’s performance and handle increased traffic by adjusting the max connection parameter in the **[MySQL](https://dev.mysql.com/doc/refman/8.4/en/option-files.html)** configuration file.

## **Steps to Change MySQL Max Connection via xCloud**

We will be using the command line to change MySQL Max Connection. Follow the steps below to increase the maximum connections MySQL allows on your xCloud server using the terminal.

### **Step 1: Access MySQL Configuration File**

Open the command terminal and run this command to edit MySQL config file:  
**sudo nano /etc/mysql/mysql.conf.d/mysqld.cnf**

![change MySQL max connection](/_landing/docs/how-to-change-mysql-max-connection-via-xcloud-image-19.png)

### **Step 2: Modify Max Connection Parameter**

In the MySQL configuration file in the nano text editor add these two lines at the end of the file as shown below if not exist (Values are based on preference):

  
**max\_allowed\_packet = 64M**

**max\_connections = 200**

![change MySQL max connection](/_landing/docs/how-to-change-mysql-max-connection-via-xcloud-image-20.png)

### **Step 3: Restart MySQL**

Restart MySQL by running this: **sudo systemctl restart mysql** to ensure that the MySQL server is operating correctly with the new max\_connection value. 

![change MySQL max connection](/_landing/docs/how-to-change-mysql-max-connection-via-xcloud-image-21.png)

Following the steps you will have successfully increased the maximum connections allowed by MySQL on your xCloud server. This adjustment can significantly enhance your server’s performance and capacity to handle demanding workloads.

![change MySQL max connection](/_landing/docs/how-to-change-mysql-max-connection-via-xcloud-image-22.png)

This is how you can easily change MySQL max connection via xCloud.

Still stuck! Contact our [**support team**](https://support.xcloud.host/) for assistance in detail with your queries.
