How can I safely remove files and which one to restore to the server? As of now, 0 bytes is free, and nothing I can do on the server.
Not directly. You will need to drop tables from within mysql to free up space. Mind that this only works for innodb if you have set
innodb_file_per_table Otherwise you will need to drop tables, create a dump of your whole database and reload it (and yes... that requires space). Otherwise the database file will not shrink.
The easier path would be to remove other files on your system.
Regarding the 2 UNDO file:
The commands to remove the UNDO tablespace:
ALTER UNDO TABLESPACE tablespace_name SET INACTIVE;
DROP UNDO TABLESPACE tablespace_name;
And you do that from within the MySQL prompt. You will loose the ability to do a rollback.
Please do not put your mysql database on the same system as your root system. Use a partition or a different disk. If you only use 1 disk it used to be common to put
/var/ on its own partition. That will prevent root from going full.
To free up space also have a look at
/var/log/ Anything with
.gz at the end can be removed. The same for files ending in a digit
*[0-9]. Those are all backups of log files and sometimes those tend to get big too.
This will automatically truncate undo logs:
SET GLOBAL innodb_undo_log_truncate=ON;