Re: Problem with LOAD_FILE
Posted by:
Rich Price
Date: October 15, 2012 08:38AM
This turns out to be an apparmor issue in UBUNTU.
I edited the local apparmor security profile for mysql in the /etc/apparmor.d/local directory. I added one line as shown below.
rich@rich2:/etc/apparmor.d/local$ more usr.sbin.mysqld
# Site-specific additions and overrides for usr.sbin.mysqld.
# For more details, please see /etc/apparmor.d/local/README.
/home/rich/NetBeansProjects/** r,
rich@rich2:/etc/apparmor.d/local$
and now LOAD_FILE works fine:
mysql> select LOAD_FILE('/home/rich/NetBeansProjects/BOARD18/data/test.text');
+-----------------------------------------------------------------+
| LOAD_FILE('/home/rich/NetBeansProjects/BOARD18/data/test.text') |
+-----------------------------------------------------------------+
| This is a test file. |
+-----------------------------------------------------------------+
1 row in set (0.02 sec)
My MYSQL should now be able to access all files and directories under the /home/rich/NetBeansProjects directory.
Subject
Written By
Posted
Re: Problem with LOAD_FILE
October 15, 2012 08:38AM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.