问题描述:

I am trying to store an image using BLOB data type in my filed in MYSQL database but when I hit Apply button, it gives me the following error:

ERROR 1105: Parameter of prepared statement which is set through mysql_send_long_data() is longer than 'max_long_data_size' bytes

I will very much appreciate any inputs.

网友答案:

in xampp that 'my'(configuration file) location is "xampp\mysql\bin\" see in bin if you get that file there. and you try to use longblob instead of blob. longblob can store more data than blob.

edit: you can store image path (ie: ../image1.jpg) in database instead of storing image into database. storing image in database may cause problem and even its not impossible to crash database.

网友答案:

The default value for max_long_data_size is 1048576 - is your picture bigger than that? If it is, you'll want to increase the value in your /etc/my.cnf file.

相关阅读:
Top