Tag Archives: MYSQL into outfile Error13

How to Solve MYSQL into outfile Error13

Error 13 is always reported when writing files. There is no problem viewing directory permissions. Finally, find the following solutions

Write files under Linxu
If you want to use the read and write functions, you must meet the following requirements

The current user is the root user
secure_file_priv is empty, or the folder to be written is just a specific folder of secure_file_priv
The folder where the shell is written must have 777 permissions, otherwise the writing will fail
File size, must be less than max_allowd_packet to
meet the above requirements in order to be written normally

Edit the file/etc/my.cof

Add
under [mysqld]

secure_file_priv =/var/www/html

MySQL view

and then

chmod 777 /var/www/html

Finally, restart the database