1

I have a table about 70G in size. I took a backup using mysqldump.

In the new server, I performed a restoration.

time mysql -uroot -p TDB < TDB.sql
Enter password:
ERROR 3 (HY000) at line 58155: Error writing file '/app/mysql/admin/tmp/MLLVx92e' 
(Errcode: 28 - No space left on device)

Further checked, showed that the general log file in /app has increased tremendously.

show variables 'general_log_file'
general_log_file                        | /app/mysql/admin/mysql.log

Does importing using mysql causes general log file to grow exponentially?

1

All statements that hit the server are stored inside the general log. So general log is duplicating your dump. The general log should be used only for debugging only, and it should be activated for the time required to spot a problem. Try to disactivate general log.

1

The general log should never be enabled on a production server (under normal circumstances), as it logs absolutely all queries (reads and writes) performed on the server, taking a lot of disk space and query performance with it.

The general log is only useful for debugging issues on the server. You should turn it off on a live server by executing:

SET GLOBAL general_log = OFF;

And permanently by setting on your my.cnf or my.ini:

[mysqld]
general_log = 0

(or commenting the line with general_log). You should get something like this:

mysql> SHOW GLOBAL VARIABLES like 'general_log';
+---------------+-------+
| Variable_name | Value |
+---------------+-------+
| general_log   | OFF   |
+---------------+-------+
1 row in set (0.01 sec)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.