Inserted image unable to show in MySQL -


create table img(id integer primary key, image blob);       insert img  value(1, load_file('c:\users\user\desktop\image/imge.png'));        select * img;  

it's showing id column. image column null.

your path not correct - last slash should backslash

c:\users\user\desktop\image\imge.png

also check:

  1. the file must located on server host
  2. you must have file privilege
  3. the file must readable , size less max_allowed_packet bytes.
  4. if secure_file_priv system variable set nonempty directory name, file loaded must located in directory.
  5. the character_set_filesystem system variable controls interpretation of file names given literal strings (default value - binary). systems on multibyte file names permitted, different value may more appropriate. example, if system represents file names using utf-8, set character_set_filesystem 'utf8'.

Comments

Popular posts from this blog

javascript - Create a stacked percentage column -

Optimising Firebase database by automatically overwriting data -

javascript - Angular UI-Grid customTemplate directive causing rows to load slowly/? -