Reputation: 862
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.
Upvotes: 3
Views: 4509
Reputation: 1868
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.
Upvotes: 1
Reputation: 3809
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.
Upvotes: 1