Section 1. Посмотреть все текущие лимиты можно командой:

Вывод будет примерно такой:

 

Section 2. 1. Start the DB server as ‘root’ user with  the comandline option and check the values of ‘net_read_timeout’ and ‘wait_timeout’

The result may be like this :
mysql> SHOW SESSION VARIABLES LIKE ‘net_read_timeout’;
+——————+——-+
| Variable_name    | Value |
+——————+——-+
| net_read_timeout | 30    |
+——————+——-+
1 row in set (0.00 sec)
mysql> SHOW SESSION VARIABLES LIKE ‘wait_timeout’;
+——————+——-+
| Variable_name    | Value |
+——————+——-+
| wait_timeout | 30    |
+——————+——-+
1 row in set (0.00 sec)

Section 3. 2. Change the values as you need

1) Here i am setting 28800 instead of 30

mysql> SET SESSION net_read_timeout=28800;
Query OK, 0 rows affected (0.00 sec)
mysql> SET SESSION wait_timeout=28800;
Query OK, 0 rows affected (0.00 sec)

Section 4. 3. Now you can check the variable values updated or not..

mysql> SHOW SESSION VARIABLES LIKE ‘net_read_timeout’;
+——————+——-+
| Variable_name    | Value |
+——————+——-+
| net_read_timeout | 28800 |
+——————+——-+
1 row in set (0.00 sec)
mysql> SHOW SESSION VARIABLES LIKE ‘wait_timeout’;
+——————+——-+
| Variable_name    | Value |
+——————+——-+
| wait_timeout | 28800 |
+——————+——-+
1 row in set (0.00 sec)
SET GLOBAL connect_timeout=60;

Section 5. 4. Now restart your mysql server

1) If you are using mysql on RedHat Linux (Fedora Core/Cent OS) then use following command:

2) If you are using mysql on Debian / Ubuntu Linux then use following command:

Thats it  !

Добавить комментарий

Ваш адрес email не будет опубликован. Обязательные поля помечены *

Этот сайт использует Akismet для борьбы со спамом. Узнайте, как обрабатываются ваши данные комментариев.