Reputation: 11
im working with sakila DB and trying to turn THE blob file in there to an image file. how can I do it?
Upvotes: 0
Views: 40
Reputation: 42834
SELECT picture
FROM staff
LIMIT 1 -- or WHERE staff_id = 1 (or 2)
INTO DUMPFILE 'C:\\ProgramData\\MySQL\\MySQL Server 8.0\\Uploads\\picture.png';
Check secure_file_priv
system variable previously.
Upvotes: 1