Home > Database > Mysql Tutorial > body text

Ubuntu 8.04 Desktop 版的MySQL BUG?

WBOY
Release: 2016-06-07 16:53:09
Original
925 people have browsed it

写了一个检测域名的脚本,在家里的Ubuntu 8.04 Desktop的机器上运行,在往Mysql数据库里导入数据的时候出错:mysqlgt; load dat

写了一个检测域名的脚本,在家里的Ubuntu 8.04 Desktop的机器上运行,在往Mysql数据库里导入数据的时候出错:

mysql> load data infile"/home/cron/ddd.txt" into table test;
ERROR 29 (HY000): File '/home/cron/ddd.txt' not found (Errcode: 13)

文件确实存在,,权限也有:

alfa@alfa-desktop:~$ ll /home/cron/ddd.txt
-rwxrwxrwx 1 alfa alfa 63825408 2008-10-30 11:13 /home/cron/ddd.txt

而数据库里的权限也给了:

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)


奇怪了,

在网上搜了一下,说好像是个BUG,不过能解决:

解决方法:

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:~$

不知道这个apparmor命令是做啥的,反正运行完这两个命令好就好使了。。

linux

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template