Use LOAD DATA INFILE if you want to import it from the filesystem or use
INSERT/UPDATE if you do it from an application (e.g. perl, php). Make
sure that the column which stores them is defined as BLOB and not as
TEXT. Look up the BLOB definition for size limitation and variations on
For getting them out of the DB use SELECT .. INTO DUMPFILE to get them
onto the file system or normal SELECT for applications.
HINT: normally it is MUCH better to store the image on the file system
and only store the path to the image in the database. But this again
depends on what you want to achieve.
From: Dan Anderson [mailto:dan@stripped]
Sent: woensdag 9 juli 2003 16:49
Subject: Is it possible to dump images into a database?
Can anyone point me to a reference on how to insert images into a column
in a mySQL database -- or is that not possible?
Thanks in advance,
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql