53AIHub icon indicating copy to clipboard operation
53AIHub copied to clipboard

{“error”:{“message”:“Error 1406 (22001): Data too long for column ‘agent_custom_config’ at row 1”,“type”:“one_api_error”}}

Open zzzhhhlll opened this issue 1 year ago • 3 comments

报错{“error”:{“message”:“Error 1406 (22001): Data too long for column ‘agent_custom_config’ at row 1”,“type”:“one_api_error”}},请问是什么原因造成的

zzzhhhlll avatar Nov 26 '25 06:11 zzzhhhlll

表字段不够长,是你写的欢迎词提示词什么的内容太长了吧

SeekArt avatar Dec 05 '25 05:12 SeekArt

是因为数据库中表字段问题导致的,临时解决方案如下:

  1. 连接到MySQL数据库
mysql -u agent -p  # 如果账户不是 agent 替换用户名
> agentpassword  # 这里输入数据库密码
  1. 选择数据库
use 53ai_hub;
  1. 查看表结构
describe messages;

可以看到messages表里agent_custom_config为VARCHAR(16)

  1. 修改列长度
ALTER TABLE messages MODIFY COLUMN agent_custom_config VARCHAR(1024);

重启数据库就行了

congcong009 avatar Dec 19 '25 05:12 congcong009

但重启后也会出结构比对的问题,所以呢,改了之后最好别停服 >.<

congcong009 avatar Dec 19 '25 06:12 congcong009