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

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct