[Bug 244406] [NEW] File load data infile'file-name' fails

Mathias Gug mathiaz at ubuntu.com
Tue Jul 1 03:47:20 BST 2008

On Tue, Jul 01, 2008 at 01:44:48AM -0000, John Gelm wrote:
> Public bug reported:
> I am migrating from 7.04 to 8.04.  The environment is Ubuntu 64bit
> desktop w/LAMP added.
> Here is the error in 8.04:
> mysql> load data infile '/var/www/tradesim/foliofn/MA46255006_open_tax_lot.csv' into table otl_csv;
> ERROR 29 (HY000): File '/var/www/tradesim/foliofn/MA46255006_open_tax_lot.csv' not found (Errcode: 13)
> mysql> 
> The message is a permission error, but I have 777'ed the entire /var/www
> to no avail.

This is due to the apparmor profile for mysqld that disallows the mysqld
process to read files in /var/www.

You can emulate the load data infile SQL statement with the mysqlimport
utility and use the LOCAL option (so that the file is sent to the mysqld
rather then mysqld opening the file directly).

Another option is to update mysqld apparmor profile to allow read access
to your file. See https://wiki.ubuntu.com/DebuggingApparmor for more
information on this.

  status wontfix

Mathias Gug
Ubuntu Developer  http://www.ubuntu.com

** Changed in: mysql-dfsg-5.0 (Ubuntu)
       Status: New => Won't Fix

 File load data infile'file-name' fails
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to mysql-dfsg-5.0 in ubuntu.

More information about the Ubuntu-server-bugs mailing list