MySQL Error 13- site down
Hello,
I saw yesterday that my Linode was eligible for an upgrade which I proceeded to do. This morning my customer calls me and tells me both sites are DOWN! It looks like it is a MySQL issue from what I can see:
user warning: Can't create/write to file '/tmp/#sqld640.MYI' (Errcode: 13)
I tried restoring yesterday's backup and that didn't work. I am going to attempt to restore a backup from 5 days ago and see if that solves the problem. Is there any way to reverse this upgrade and bring me back to where I was?
1 Reply
Hey there,
"Errcode: 13" is a permissions error with MySQL that can be impacted by anti-malware services, configuration errors, or incorrect permissions.
The first thing to do is check and make sure you've made sure the disk is using the full space available to it since the resize:
You can check the disk space to make sure MySQL has enough space to operate normally with the following:
$ df -h
My recommendation is to then check the MySQL logs to find where the problem is occurring. If you are using the default configurations, you can find the logs here:
/var/log/mysql.log
You may be able to identify and resolve the issues causing the errors by viewing the logs more closely. Once you've collected your error information, try restarting MySQL to see if the error clears when it restarts and updates the configuration with any changes you've made:
$ sudo /etc/init.d/mysql restart
Here are some resources to help you better understand the error you encountered, along with some helpful, detailed troubleshooting steps:
https://www.scalescale.com/tips/nginx/cant-createwrite-to-file-tmp-errcode-13-mysql-error/#
https://dev.mysql.com/doc/refman/8.0/en/cannot-create.html