I wrote a script to check the domain name and run it on Ubuntu8.04Desktop at home. An error occurred while importing data to the Mysql database: mysql & gt; loaddatainfile "/home/cron/ddd.txt" extract tabletest; ERROR29 (HY000): File '/home/cron/ddd.txt' notfound (Errcode: 13)
I wrote a script to check the domain name and run it on my Ubuntu 8.04 Desktop machine. An error occurred while importing data to the Mysql database:
Mysql> load data infile "/home/cron/ddd.txt" into table test;
ERROR 29 (HY000): File '/home/cron/ddd.txt' not found (Errcode: 13)
The file exists and has the following permissions:
Alfa @ alfa-desktop :~ $ Ll/home/cron/ddd.txt
-Rwxrwxrwx 1 alfa 63825408/home/cron/ddd.txt
The permissions in the database are also given:
Mysql> select * from mysql. user where user = "root" and host = "localhost" \ G;
* *************************** 1. row ***************************
Host: localhost
User: root
Password:
Select_priv: Y
Insert_priv: Y
Update_priv: Y
Delete_priv: Y
Create_priv: Y
Drop_priv: Y
Reload_priv: Y
Shutdown_priv: Y
Process_priv: Y
File_priv: Y
Grant_priv: Y
References_priv: Y
Index_priv: Y
Alter_priv: Y
Show_db_priv: Y
Super_priv: Y
Create_tmp_table_priv: Y
Lock_tables_priv: Y
Execute_priv: Y
Repl_slave_priv: Y
Repl_client_priv: Y
Create_view_priv: Y
Show_view_priv: Y
Create_routine_priv: Y
Alter_routine_priv: Y
Create_user_priv: Y
Ssl_type:
Ssl_cipher:
X509_issuer:
X509_subject:
Max_questions: 0
Max_updates: 0
Max_connections: 0
Max_user_connections: 0
1 row in set (0.00 sec)
Strange,
I searched the internet and said it was like a BUG, but it could be solved:
Solution:
Gelmjw @ voyager :~ $ Sudo aa-complain/usr/sbin/mysqld
[Sudo] password for gelmjw:
Setting/usr/sbin/mysqld to complain mode.
Gelmjw @ voyager :~ $ Sudo/etc/init. d/apparmor reload
Reloading AppArmor profiles: done.
Gelmjw @ voyager :~ $
I don't know what the apparmor command is for. It's easy to run the two commands ..