gpt4 book ai didi

mysql - 对于长文本数据类型的列,数据太长 - MySqlException

转载 作者:行者123 更新时间:2023-11-29 07:07:28 25 4
gpt4 key购买 nike

我正在尝试在 LONGTEXT 列中插入字符串。字符串长度为 75402,字节数为 150804(约 147 KB)

Table Structure

插入记录时抛出异常数据对于列来说太长

MySQL文档规定LONGTEXT最多可以包含4GB数据

欢迎任何建议

最佳答案

http://dev.mysql.com/doc/refman/5.7/en/string-type-overview.html

LONGTEXT [CHARACTER SET charset_name] [COLLATE collation_name]

A TEXT column with a maximum length of 4,294,967,295 or 4GB (232 − 1) characters. The effective maximum length is less if the value contains multibyte characters. The effective maximum length of LONGTEXT columns also depends on the configured maximum packet size in the client/server protocol and available memory. Each LONGTEXT value is stored using a 4-byte length prefix that indicates the number of bytes in the value.

<小时/>

http://dev.mysql.com/doc/refman/5.7/en/server-system-variables.html#sysvar_max_allowed_packet http://dev.mysql.com/doc/refman/5.7/en/memory-use.html

关于mysql - 对于长文本数据类型的列,数据太长 - MySqlException,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41114862/

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