0

I used the following code for uploading an image file into my database from an answer in stack overflow, but it is not getting updated. Please help.

mysql> update S516 set photo = LOAD_FILE('/home/rsreekumar/db/java16/photos/13134.PNG') where roll_no = "AM.EN.U4CSE13134";
Query OK, 0 rows affected (0.00 sec)
Rows matched: 1  Changed: 0  Warnings: 0

My question is same. but not working.

Sreekumar R
  • 573
  • 6
  • 24

1 Answers1

0

Can you check?

  1. mysql user has permissions to read file
  2. where condition is correct
  3. column photo is blob
  4. you have permissions to use LOAD_FILE
  5. file size less than max_allowed_packet bytes
  6. if the secure_file_priv system variable is set to a nonempty directory name, the file to be loaded must be located in that directory
  7. is AppArmor protection running (and blocking)?
Diego Betto
  • 721
  • 6
  • 19