tag:blogger.com,1999:blog-9161751858544242374.post4614227239873385561..comments2017-12-14T18:10:30.901+08:00Comments on Angkat Bahu: MySQL LOAD_FILE() in Ubuntu, It Works!Anonymoushttp://www.blogger.com/profile/02429580908692830802noreply@blogger.comBlogger6125tag:blogger.com,1999:blog-9161751858544242374.post-16397165421734667682017-12-14T18:10:30.901+08:002017-12-14T18:10:30.901+08:00It does not work... LOAD_FILE() return NULL
mysql...It does not work... LOAD_FILE() return NULL<br /><br />mysql> insert into image (Id,Name,Image_Data, Image_File_Name) values(1,"doll",<br />LOAD_FILE('/var/lib/mysql/all_image/chain.jpeg'),"chain");<br />Query OK, 1 row affected (0.47 sec)<br /><br />mysql> select * from image; <br /><br />+------+------+------------+-----------------+<br />| Id | Name | Image_Data | Image_File_Name |<br />+------+------+------------+-----------------+<br />| 1 | doll | NULL | chain |<br />+------+------+------------+-----------------+Suriyahttps://www.blogger.com/profile/01674207890821427995noreply@blogger.comtag:blogger.com,1999:blog-9161751858544242374.post-92219863219235545722017-12-14T18:06:02.444+08:002017-12-14T18:06:02.444+08:00This comment has been removed by the author.Suriyahttps://www.blogger.com/profile/01674207890821427995noreply@blogger.comtag:blogger.com,1999:blog-9161751858544242374.post-29539883529337425142017-06-08T02:22:31.689+08:002017-06-08T02:22:31.689+08:00does not workdoes not workAnonymoushttps://www.blogger.com/profile/10760416295313854017noreply@blogger.comtag:blogger.com,1999:blog-9161751858544242374.post-60757199661549181252014-10-03T17:22:56.818+08:002014-10-03T17:22:56.818+08:00It works also on MariaDB, the problem seem related...It works also on MariaDB, the problem seem related on the ownership of the main folder, if user mysql has the full access (rw) than it allows the read permission.Lucahttps://www.blogger.com/profile/11202452791636187599noreply@blogger.comtag:blogger.com,1999:blog-9161751858544242374.post-27358551574683196682013-09-03T00:43:29.234+08:002013-09-03T00:43:29.234+08:00Thanks very much Mohd for taking the time to post ...Thanks very much Mohd for taking the time to post this. I spent considerable effort trying to google a solution until I decided to see if this was an Ubuntu issue, as it turned out to be. I had to edit the /etc/password to add "/var/lib/mysql" as the home directory for mysql (otherwise it had "/nonexistent"), also, at least for me (Ubuntu 13.04 w/MySQL 5.5.32), doing the chown mysql:mysql the previous commenter gave wouldn't work.Glen Mazzahttps://www.blogger.com/profile/04813726189977741989noreply@blogger.comtag:blogger.com,1999:blog-9161751858544242374.post-91263061777211718012011-09-25T11:36:26.207+08:002011-09-25T11:36:26.207+08:00It also works if you "sudo chown mysql:mysql ...It also works if you "sudo chown mysql:mysql filename".Anonymousnoreply@blogger.com