Ubuntu 8.04 Desktop 版的MySQL BUG?

來源:互聯網
上載者:User

寫了一個檢測網域名稱的指令碼,在家裡的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命令是做啥的,反正運行完這兩個命令好就好使了。。

相關文章

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.