gpt4 book ai didi

mysql - #2013 - 当我运行此查询时,在查询期间丢失了与 MySQL 服务器的连接

转载 作者:行者123 更新时间:2023-11-29 15:20:23 26 4
gpt4 key购买 nike

SELECT
contact_list.id,
contact_list.contact_number,
call_history.id,
call_history.user_id,
call_history.contact_number,
call_history.call_type,
call_history.call_duration,
call_history.call_date,
call_history.call_time,
call_history.audio_file,
employees.username
FROM
call_history
JOIN contact_list ON contact_list.contact_number = call_history.contact_number
JOIN employees ON employees.id = call_history.user_id
WHERE
call_history.id IN(
SELECT
MAX(call_history.id)
FROM
call_history
WHERE
1 AND employees.username LIKE '%bha%'
GROUP BY
call_history.contact_number
)
ORDER BY
call_history.id
DESC

最佳答案

您可以尝试设置 max_allowed_pa​​cket 变量并再次运行查询吗?

mysql> set global max_allowed_packet=104857600;
Query OK, 0 rows affected (0.00 sec)

mysql>

或者您可以使用 https://dev.mysql.com/doc/refman/5.7/en/error-lost-connection.html 调试原因

关于mysql - #2013 - 当我运行此查询时,在查询期间丢失了与 MySQL 服务器的连接,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59407748/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com