MySQL provides an internal function named load_file(). It reads the file
saved on the host server and returns the contents of the file as a
string. This is an appoach to make users can read the file on the host
server directly by using database. But I think this function can be
improved
I have set up a script to recieve a pdf file and store it in a mysql db
using "update db set field=load_file('fileIncludingFile') where id=$id".
Afterwards I can see the file has been uploaded into the blob field
successfully and without errors. Now I want to get the file b
t"?
> On Friday, June 27, 2003, at 02:06 PM,
> [EMAIL PROTECTED] wrote:
>
>>
>> Seth Redmond <[EMAIL PROTECTED]> wrote:
>>> I've been having a few problems loading blobs via the LOAD_FILE
>>> function
>>>
>>> I've tried things
ing on the same machine, so I
shouldn't be having any problems from the server.
-s
On Friday, June 27, 2003, at 02:06 PM,
[EMAIL PROTECTED] wrote:
Seth Redmond <[EMAIL PROTECTED]> wrote:
I've been having a few problems loading blobs via the LOAD_FILE
function
I've trie
Seth Redmond <[EMAIL PROTECTED]> wrote:
> I've been having a few problems loading blobs via the LOAD_FILE function
>
> I've tried things along the lines of:
>
> UPDATE table SET binaryRecord=LOAD_FILE("/Users/shared/filename.mov")
> where refNo=
I've been having a few problems loading blobs via the LOAD_FILE function
I've tried things along the lines of:
UPDATE table SET binaryRecord=LOAD_FILE("/Users/shared/filename.mov")
where refNo=1;
It only seems to happen when loading something over 1-1.5mb, as I've
--- Original Message -
From: "Herbert Kunzmann" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, January 11, 2003 9:03 AM
Subject: MySQL LOAD_FILE problems
>
> Using MySQL, I have a problem where I am attempting to upload a 16.4MB
file
> into a BLOB field,
Using MySQL, I have a problem where I am attempting to upload a 16.4MB file
into a BLOB field, but the insert fails with a
ERROR 1030: Got error 139 from table handler
and after trying again I get
ERROR 1062: Duplicate entry 'bla' for key 1
BUT the entry was never made. I need to repair the ta
i also figured out that load_file only works on the local server, not from
clients...duh!
thanks!
-Original Message-
From: Egor Egorov [mailto:egor.egorov@;ensita.net]
Sent: Tuesday, October 29, 2002 12:19 PM
To: [EMAIL PROTECTED]
Subject: re: using load_file...problems
Shon,
Tuesday
Shon,
Tuesday, October 29, 2002, 7:01:47 PM, you wrote:
SS> i am trying to insert data into a blob column. its not working. i have tried
SS> setting --local-infile=1. i tried granting file to my user and got an error.
SS> i have read the manaul (for all you smarties who like to rtfm everyone) and
sql/mysql
i am trying to insert data into a blob column. its not working. i have tried
setting --local-infile=1. i tried granting file to my user and got an error.
i have read the manaul (for all you smarties who like to rtfm everyone) and
still don't get it. here is what i did for grant
grant fi
mysql probably does not have search permission on /home/alex.
copy the file to /tmp and see what happens.
Alex Safonov wrote:
>Greetings,
>
>just saw a message with an example of inserting a BLOB
>value using load_file(). Can't get load_file() to
>work:
>
>mysql>
Greetings,
just saw a message with an example of inserting a BLOB
value using load_file(). Can't get load_file() to
work:
mysql> select load_file('/home/alex/post.html') from
test;
+---+
| load_file(
Problem
Mysql version 3.23.39 Linux version
SQL: INSERT INTO Pictures(Pers_ID, Picture) VALUES (1,
LOAD_FILE('\Database\pictures\1.bmp'));
above sql works fine.
Mysql version 3.23.49-max Windows version
SQL: INSERT INTO Pictures(Pers_I
Hello,
function load_file always return NULL for me.
I tried using INSERT and UPDATE. The file and directory is
world readable. Is there a known problem with load_file on
mysql 4.0.0 ?
INSERT INTO tests (Name,Data) VALUES
('123.456',LOAD_FILE("/home/mysql/testfile"));
U
First off, you trying to insert the image into the database or just its
path?
-Original Message-
From: yue cheng [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 06, 2002 2:23 PM
To: [EMAIL PROTECTED]
Subject: Load_File issue
Hi,
Now I am puzzled by the filepath,Load_file, I
At 4:22 +0800 2/7/02, yue cheng wrote:
>Hi,
>
>Now I am puzzled by the filepath,Load_file, I install
>MySQL in Windows98, the file which i want to insert to
>table is c:\P1.bmp
>
>when I run load_file in mysql command line,it succeeds
>mysql> insert into blobtable (l
At 4:22 +0800 2/7/02, yue cheng wrote:
>Hi,
>
>Now I am puzzled by the filepath,Load_file, I install
>MySQL in Windows98, the file which i want to insert to
>table is c:\P1.bmp
>
>when I run load_file in mysql command line,it succeeds
>mysql> insert into blobtable (l
First off, you trying to insert the image into the database or just its
path?
-Original Message-
From: yue cheng [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 06, 2002 2:23 PM
To: [EMAIL PROTECTED]
Subject: Load_File issue
Hi,
Now I am puzzled by the filepath,Load_file, I
Hi,
Now I am puzzled by the filepath,Load_file, I install
MySQL in Windows98, the file which i want to insert to
table is c:\P1.bmp
when I run load_file in mysql command line,it succeeds
mysql> insert into blobtable (load_file("/P1.bmp"))
but i don't know why i should us
[EMAIL PROTECTED]>
Cc: <
Sent: Friday, February 01, 2002 5:57 PM
Subject: Re: LOAD_FILE over SMB filesystems
> At 17:47 + 2/1/02, Kevin Smith wrote:
> >I don't get an error message... I'm actually running the script from the
> >shell > prompt, so I'm t
ript ag'in and see what happens.
>
>Here is the DBI debug :
>
>[root@server1 cgi-bin]# perl blob.cgi
> DBI::db=HASH(0x81b34a0) trace level set to 2 in DBI 1.14-nothread
> Note: perl is running without the recommended perl -w option
> -> prepare for DBD::mysq
Paul DuBois wrote:
> At 11:32 -0600 2/1/02, Gerald Clark wrote:
>
>> The single quotes around $image prevent perl from substituting the
>> value.
>> You are trying to load a file named $imageFN.
>> $SQL = "UPDATE banners SET image=load_file(\"$imag
hread
Note: perl is running without the recommended perl -w option
-> prepare for DBD::mysql::db (DBI::db=HASH(0x81b34b8)~0x81b34a0 'UPDATE
banners SET banners.image =
LOAD_FILE('/var/www/htdocs/corporate/images/homenew.jpg') where
banners.id=1')
Setting mysql_use_result t
at you get.
What is it?
>
>- Original Message -
>From: "Paul DuBois" <[EMAIL PROTECTED]>
>To: "Gerald Clark" <[EMAIL PROTECTED]>; "Kevin Smith"
><[EMAIL PROTECTED]>
>Cc: <[EMAIL PROTECTED]>
>Sent: Friday, February
MAIL PROTECTED]>
Sent: Friday, February 01, 2002 5:37 PM
Subject: Re: LOAD_FILE over SMB filesystems
> At 11:32 -0600 2/1/02, Gerald Clark wrote:
> >The single quotes around $image prevent perl from substituting the value.
> >You are trying to load a file named $imageFN.
> &
[root@server1 cgi-bin]# perl blob.cgi
DBI::db=HASH(0x81b34a0) trace level set to 2 in DBI 1.14-nothread
Note: perl is running without the recommended perl -w option
-> prepare for DBD::mysql::db (DBI::db=HASH(0x81b34b8)~0x81b34a0 'UPDATE
banners SET banners.image =
LOAD_FILE(
At 11:32 -0600 2/1/02, Gerald Clark wrote:
>The single quotes around $image prevent perl from substituting the value.
>You are trying to load a file named $imageFN.
>$SQL = "UPDATE banners SET image=load_file(\"$imageFN\") where id=1";
But the single quotes are withi
The single quotes around $image prevent perl from substituting the value.
You are trying to load a file named $imageFN.
$SQL = "UPDATE banners SET image=load_file(\"$imageFN\") where id=1";
Kevin Smith wrote:
>After reading some other posts on inserting a image into a blo
After reading some other posts on inserting a image into a blob field, I
tried using DBI to insert and the following does not work...
I've double-checked the path and it is correct.
$imageFN = '/var/www/htdocs/corporate/images/homenew.jpg';
$SQL = "UPDATE banners SET image
>
> PM> e.g.
>
> PM> UPDATE Reading SET Data=LOAD_FILE("//linbox/log/travel/001.jpg") WHERE id=1;
>
> Loading files from windows/samba shares is not supported.
>
>
> PM> Panos
Have you tried smbmount?
Stephen
---
Hello everyone,
I have some problems loading files into blobs when the file resides on a network
filesystem e.g. SAMBA. I use mysqld 3.23.43-nt.
e.g.
UPDATE Reading SET Data=LOAD_FILE("//linbox/log/travel/001.jpg") WHERE id=1;
Query OK, 0 rows affected (0.05 sec)
Rows matched:
Hello everyone,
I run mysql server (3.23.43-nt) on win2k. I have a problem when I try to load a file
into a blob column from a mounted via SMB unix filesystem.
I can create and access those files with other programs from the NT box.
Any ideas how to trace the problem? I get no error and mysql
OTECTED]>
Sent: Wednesday, November 21, 2001 2:08 PM
Subject: Re: LOAD_FILE does not work
>
> - Original Message -
> From: "Carsten H. Pedersen" <[EMAIL PROTECTED]>
> To: "Sharaaz Khan" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
> Sent: W
- Original Message -
From: "Carsten H. Pedersen" <[EMAIL PROTECTED]>
To: "Sharaaz Khan" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Wednesday, November 21, 2001 1:52 PM
Subject: RE: LOAD_FILE does not work
> > I have been trying to
On Wed, 21 Nov 2001 17:02:29 -0500, Christopher Book <[EMAIL PROTECTED]> wrote:
>>>>UPDATE Software SET Description =
>>LOAD_FILE(/usr2/home/khan/www/cgibin/protecting/Describe/description_file)
>>WHERE ID = 9
>>
>>You have to make sure that not onl
>>UPDATE Software SET Description =
LOAD_FILE(/usr2/home/khan/www/cgibin/protecting/Describe/description_file)
WHERE ID = 9
You have to make sure that not only can mysql read the file, but it also has
permissions to the directories that the files are in. Typically your home
directory o
> I have been trying to load the textual contents of a file from my
> hard drive
> space into a field (Description) of my mySQL table (Software) using the
> follwing query. The query runs succfessfully
How do you know that it's successful? What success/error codes
(if any) are returned?
>
>
updated at
all:
UPDATE Software SET Description =
LOAD_FILE(/usr2/home/khan/www/cgibin/protecting/Describe/description_file)
WHERE ID = 9
I have used single and double quotes around the file name without success.
In the mySQL documentation, it says that I need FILE privileges. I asked my
ISP to give me
oops...I'm wrong...you can load that way.
-Original Message-
From: Rick Emery
Sent: Monday, November 12, 2001 12:56 PM
To: [EMAIL PROTECTED]
Subject: RE: load_file problem
Are you trying to load the contents of a file with an INSERT statement? If
so, you can't. The valu
inisa Milivojevic
Cc: [EMAIL PROTECTED]
Subject: load_file problem
Hi!
I am stuck with the load_file problem...
I have created the following table :
create table table_name (field_number1 int unsigned primary key not
null, data_field longblob not null);
I then tried to load the contents of a file
Hi!
I am stuck with the load_file problem...
I have created the following table :
create table table_name (field_number1 int unsigned primary key not
null, data_field longblob not null);
I then tried to load the contents of a file with permissions -rw-r--r--
located in the /home/user directory
into table_name(field_name1,data_file) values
>> (1,load_file('/absolute/path/file_name.jpg'));
>
>
> sorry abt the error guys..
> but guys this still returns a NULL value. please help.
> thanks!
> venu
>
>
>
> =
> ==
Hi All!
I am sorry that I posted that message with a syntactical error. but
what i meant to write was this..
> insert into table_name(field_name1,data_file) values
> (1,load_file('/absolute/path/file_name.jpg'));
sorry abt the error guys..
but guys this still returns a NULL va
ile longblob not null);
>
> I then tried to input file into the data_file field using the load_file
> function using:
>
> insert into table_name(field_name1,data_file) values
> (1,'/absolute/path/file_name.jpg'));
>
> but it kept giving me an error that data_file
input file into the data_file field using the load_file
function using:
insert into table_name(field_name1,data_file) values
(1,'/absolute/path/file_name.jpg'));
but it kept giving me an error that data_file does not allow NULL
values. Hence, after some trouble shooting, I figured ou
The manual said if you want to write a BLOB data into
file, you should use INTO DUMPFILE,
But that still doen't work.
I got a Dumpfile with just 1 byte.
There is a BLOB data in my table.
What is the problem?
best regards
hxia
>See MySQL Manual section 6.4.1
>SELECT INTO OUTFILE
--
See MySQL Manual section 6.4.1
SELECT INTO OUTFILE
database <- to satisfy mailer-daemon
> -Original Message-
> From: Jason Kwok [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, September 19, 2001 10:21 PM
> To: [EMAIL PROTECTED]
> Subject: Load_File
>
>
>
Load_File is used to read a picture (or any binary) file into table, but how
to write it back to disk from a table?
==
Best Regards
Jason Kwok
==
---
Virus Free
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.281 / Virus Database: 149 - Release Date
>Description:
The following script should insert some files in a table, but load_file seems
not to work
I think it is only a small error, but I don't find it.
Command File:
#
#!/bin/sh
set -exv
#
D, PICT) VALUES (1, LOAD_FILE( '/images/image.jpg')).
> It work o.k. MySQL save file image.jpg to table PICTURES. But when I look to table
> PICTURES on slave server in field ID is value 1 but field PICT is empty. Why?
> Work function LOAD_FILE with replication correctly?
I'
Hi,
I have two servers with MySQL 3.23.24-beta. One as master and one as slave.
Replication between this two servers work fine. Now I want store pictures
to table. On master server I use command
INSERT INTO PICTURES (ID, PICT) VALUES (1, LOAD_FILE( '/images/image.jpg')).
It work o.k.
l
Subject: load_file
Hi
I have been trying to use load_file to store a file as a BLOB object in a
database table but it always returns NULL although I have made sure that the
path is correct and I have the appropriate priviliges.
Any hints how to use load_file
Hi
I have been trying to use load_file to store a file as a BLOB object in a database
table but it always returns NULL although I have made sure that the path is correct
and I have the appropriate priviliges.
Any hints how to use load_file correctly
t" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, February 21, 2001 9:53
Subject: LOAD_FILE /TEXT
> Hi,
>
> I'm storing a text file in a TEXT column using the LOAD_FILE function like
> this:
> INSERT ... text_col=LOAD_FILE('filename')
>
Hi,
I'm storing a text file in a TEXT column using the LOAD_FILE function like
this:
INSERT ... text_col=LOAD_FILE('filename')
Each line of the orig file ends with char 10.
When I SELECT it like
SELECT text_col INTO OUTFILE 'out_filename' ...
I find that each line
56 matches
Mail list logo