Вопрос по sql, mysql, database – Код ошибки: 2013. Потеря соединения с сервером MySQL во время запроса

182

Я получилError Code: 2013. Lost connection to MySQL server during query ошибка при попытке добавить индекс в таблицу с использованием MySQL Workbench. Я также заметил, что это появляется всякий раз, когда я запускаю длинный запрос.

Можно ли увеличить значение тайм-аута?

Ваш Ответ

26   ответов
0

0

4

8

max_allowed_packet

net_write_timeout

net_read_timeout

0

indexes

SELECT *
FROM INFORMATION_SCHEMA.STATISTICS
WHERE TABLE_SCHEMA = '<schema>'
1

349

аймауты.

Error: User Rate Limit Exceeded

Error: User Rate Limit Exceeded

Error: User Rate Limit Exceeded

Error: User Rate Limit Exceeded
Error: User Rate Limit Exceededstackoverflow.com/q/16877574/395857Error: User Rate Limit Exceededbugs.mysql.com/bug.php?id=69395)
Error: User Rate Limit Exceeded
Error: User Rate Limit Exceeded
Error: User Rate Limit ExceededDBMS connection read time outError: User Rate Limit Exceeded
10
SET @@local.net_read_timeout=360;

Error: User Rate Limit Exceeded

SET @@global.net_read_timeout=360;
0

8

Error: User Rate Limit Exceeded
0

7

performance_schema, information_schema

sudo mysql_upgrade -u root -p
Error: User Rate Limit Exceeded
Error: User Rate Limit Exceeded
16

Error: User Rate Limit Exceededmy.iniError: User Rate Limit ExceededError: User Rate Limit Exceeded:

[mysqld]
max_allowed_packet=16M

Error: User Rate Limit Exceeded

Error: User Rate Limit Exceeded2006Error: User Rate Limit Exceededmax_allowed_packetError: User Rate Limit ExceededdidError: User Rate Limit Exceeded

For WAMP users: you'll find the flag in the [wampmysqld] section.

Error: User Rate Limit Exceeded
Error: User Rate Limit Exceeded
Error: User Rate Limit Exceeded
14

Error: User Rate Limit Exceeded

innodb_buffer_pool_size = 64M

пример:

key_buffer              = 16M
max_allowed_packet      = 16M
thread_stack            = 192K
thread_cache_size       = 8
innodb_buffer_pool_size = 64M
Error: User Rate Limit Exceeded/etc/mysql/cnfError: User Rate Limit Exceeded/etc/my.cnf?
2

9

Usually it indicates network connectivity trouble and you should check the condition of your network if this error occurs frequently Sometimes the “during query” form happens when millions of rows are being sent as part of one or more queries. More rarely, it can happen when the client is attempting the initial connection to the server

For more detail read >>

SET GLOBAL interactive_timeout=60;

from its default of 30 seconds to 60 seconds or longer

Причина 3:

SET GLOBAL connect_timeout=60;
28

net_read_timeout / wait_timeout--net_read_timeout=100.

Для справки см.ВотВот.

Error: User Rate Limit Exceeded
Error: User Rate Limit Exceeded
0

Executemysql

-1

1

3

show variables like "net_buffer_length";

increase net_buffer_length inside mysql -> this would need a server restart create dump with --skip-extended-insert, per insert one line is used -> although these dumps are much nicer to read this is not suitable for big dumps > 1GB because it tends to be very slow create dump with extended inserts (which is the default) but limit the net-buffer_length e.g. with --net-buffer_length NR_OF_BYTES where NR_OF_BYTES is smaller than the server's net_buffer_length -> I think this is the best solution, although slower no server restart is needed.

I used following mysqldump command: mysqldump --skip-comments --set-charset --default-character-set=utf8 --single-transaction --net-buffer_length 4096 DBX > dumpfile

4

1. Control-click your connection and choose Connection Properties.
2. Under Advanced tab, set the Socket Timeout (sec) to a larger value.
3

2

mysql -u <user> -p -D <DB name> < file.sql

-1

OOM on /var/log/messages ,
modify innodb_buffer_pool_size value ; when load data , use 50% of os mem ; 

0

Похожие вопросы