Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to save BLOB data type image

Tags:

mysql

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.

like image 663
Stranger Avatar asked Jan 21 '26 12:01

Stranger


1 Answers

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.

like image 85
user1844626 Avatar answered Jan 24 '26 08:01

user1844626



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!