List:General Discussion« Previous MessageNext Message »
From:gerald_clark Date:June 10 2003 5:46pm
Subject:Re: Insert Image content via command line
View as plain text  
How big is the imge file?
How do you check the contents of the table?
How are you determining that it is null?
Did you try to select the column into an outfile?
If so, how big was the outfile?


Titu Kim wrote:

>Yes, the image file is on the server and i already
>chown and chrgp to mysql for this file. Still the data
>is null in the table.
>
>
>--- gerald_clark <gerald_clark@stripped>
>wrote:
>  
>
>>Titu Kim wrote:
>>
>>    
>>
>>>Hi,
>>>   I am trying to insert an image directly from
>>>command line into mysql table. My table looks like
>>>
>>>==============
>>>Create table ImageTab (id int, content longblob);
>>>===========================
>>>
>>>I login to localhost. I have an image at /tmp. Then
>>>      
>>>
>>i
>>    
>>
>>>issue this query
>>>
>>>================
>>>insert into ImageTab values(1,
>>>load_file("/tmp/myimg.gif"));
>>>==================
>>>No error. But when i check the content of the
>>>      
>>>
>>table,
>>    
>>
>>>the content column is null. I login as root to do
>>>this.
>>>What have i done wrong? Please help.
>>>
>>>Thanks.
>>> 
>>>
>>>      
>>>
>>The file must be on the server, and readable by the
>>user 'mysql'
>>
>>
>>-- 
>>MySQL General Mailing List
>>For list archives: http://lists.mysql.com/mysql
>>To unsubscribe:   
>>http://lists.mysql.com/mysql?unsub=1
>>
>>    
>>
>
>
>__________________________________
>Do you Yahoo!?
>Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
>http://calendar.yahoo.com
>
>  
>


Thread
Insert Image content via command lineTitu Kim10 Jun
  • Re: Insert Image content via command linegerald_clark10 Jun
    • Re: Insert Image content via command lineTitu Kim10 Jun
      • Re: Insert Image content via command linegerald_clark10 Jun