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:
- the file must located on server host
- you must have file privilege
- the file must readable , size less max_allowed_packet bytes.
- if secure_file_priv system variable set nonempty directory name, file loaded must located in directory.
- 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
Post a Comment