Inserting a file into mysql database (BLOB)
Mikkel L. Ellertson
mikkel at infinity-ltd.com
Tue Jun 20 21:59:57 UTC 2006
Matthew Benjamin wrote:
> Can anyone tell me how to insert a file (BLOB) into a mysql database,
> from the command line NOT from a webpage.
>
If the file is in the proper format, you can try something like:
mysql -u <user> -p < BLOB
or
mysql -u <user> -p <database> < BLOB
I have used this with mysql backups before. If you do not need a
password, then skip the -p option. If you use it, you will be
prompted for the password.
Mikkel
--
Do not meddle in the affairs of dragons,
for thou art crunchy and taste good with Ketchup!
More information about the fedora-list
mailing list