Issue Encountered:
When running MySQL for an extended period or performing SQL imports, you might see the following error:
|
|
This error is generally caused by the disk where MySQL’s temporary directory is located being full.
Solution:
Method 1: Free up disk space on the drive where the temporary directory is located by deleting unnecessary files to create space.
Method 2: Change MySQL’s temporary directory to a drive with more available space. Here’s how to do it:
-
Stop the MySQL server. On Windows, execute
net stop mysql80
in the command line (the service name may vary depending on the MySQL version). On Linux, runsystemctl stop mysql
. -
Modify the MySQL configuration file. For Windows, the default path is
C:\\ProgramData\\MySQL\\MySQL Server 8.0\\my.ini
. For Linux, it is/etc/my.cnf
. Add the following line:
|
|
After making these changes, restart the MySQL server to apply them.
This resolves the issue.