MySQL: Can't create/write to file '/tmp/#sql_3c6_0.MYI' (Errcode: 2) - What does it even mean?

后端 未结 14 1014
忘掉有多难
忘掉有多难 2020-12-02 14:00

For some reason my production DB decided to spew out this message. All application calls fail to the DB with the error:

PreparedStatementCallback; SQL [ /*lo         


        
14条回答
  •  北荒
    北荒 (楼主)
    2020-12-02 14:54

    Its due to access control security policies specifically when SELinux is enabled it won't allow external executables to create temporary files in the system locations.

    Disable SELinux by issuing below command:

    echo 0 >/selinux/enforce

    You can now start mysql it wont give any permission related errror while reading/writing to /tmp or system directories.

    In case you wish to enable the SELinux security back change 0 to 1 in above command.

提交回复
热议问题