mysqldump - Error: 'Can't create/write to file '/var/tmp/#sql_a41_2.MAI' (Errcode : 2)
Hi, when i am trying to mysqldump showing following error -
[root@linode ~ html]# mysqldump -u root -p databasename> filename.sql
Enter password:
mysqldump: Error: 'Can't create/write to file '/var/tmp/#sql_a41_2.MAI' (Errcode : 2)' when trying to dump tablespaces
mysqldump: Couldn't execute 'show fields from activated': Can't create/write t o file '/var/tmp/#sql_a41_0.MAI' (Errcode: 2) (1)
1 Reply
Hey there,
This could be an issue with a lack of space in your /tmp keeping the file from being created. It may also be the result of a permissions error or configuration error.The file being referenced #sql_a41_2.MAI
appears to be a system generated temporary filename.
We recommend restarting the service to clear any excessive temporary files:
$ /etc/init.d/mysqld restart
If that doesn't improve the situation, we recommend reviewing your configuration file and permissions, particularly if you are using SE Linux:
$ cat /etc/my.cnf | grep tmpdir
$ ls /var/tmp
Please let us know the outcome of these troubleshooting steps and if they helped resolve your issue.
Sincerely,
Tara T
Linode Support Team