An error occurred while writing files in MySQL in Linux (Errcode: 13) solution: select * into outfile '/home/mysql/data in the database. SQL 'Shell prompts ERROR when exporting data: ERROR 1 (HY000): Can't create/write to file'/home/mysql/data. SQL '(Errcode: 13) after confirming that it is not a permission issue, use the following method to solve setsebool-P mysqld_disable_trans = 1. After executing the preceding command, restart the mysql service, shell does not report the error "shell> getsebool-a". You can view the current permissions on a series of Daemon Processes in the system. Offline --> off mail_read_content --> off queue illa_read_content --> off queue --> off nagios_disable_trans --> off queue --> on nfs_export_all_rw --> on nfsd_disable_trans --> off nmbd_disable_trans --> off nrpe_disable_trans --> off-P indicates yes Permanent settings. Otherwise, the preset values are restored after restart.