Question

Erro MySQL não inicia.

Posted June 23, 2021 73 views
MySQL
root@zabbix:/etc/mysql# journalctl -xe -u mysql
-- Subject: Unit process exited
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- An ExecStart= process belonging to unit mysql.service has exited.
--
-- The process' exit code is 'exited' and its exit status is 1.
jun 23 09:22:57 zabbix systemd[1]: mysql.service: Failed with result 'exit-code'.
-- Subject: Unit failed
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- The unit mysql.service has entered the 'failed' state with result 'exit-code'.
jun 23 09:22:57 zabbix systemd[1]: Failed to start MySQL Community Server.
-- Subject: A unidade mysql.service falhou
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- A unidade mysql.service falhou.
--
-- O resultado é failed.
jun 23 09:23:59 zabbix systemd[1]: Starting MySQL Community Server...
-- Subject: Unidade mysql.service sendo iniciado
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- A unidade mysql.service está sendo iniciada.
jun 23 09:24:00 zabbix mysqld[2157]: 2021-06-23T12:24:00.081574Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.23) starting as process 2157
jun 23 09:24:00 zabbix mysqld[2157]: 2021-06-23T12:24:00.094606Z 0 [Warning] [MY-000081] [Server] option 'innodb-force-recovery': unsigned value 10 adjusted to 6.
jun 23 09:24:00 zabbix mysqld[2157]: 2021-06-23T12:24:00.099307Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
jun 23 09:24:00 zabbix mysqld[2157]: 2021-06-23T12:24:00.451399Z 1 [Warning] [MY-012637] [InnoDB] 1048576 bytes should have been written. Only 864256 bytes written. Retrying for the remaining bytes.
jun 23 09:24:00 zabbix mysqld[2157]: 2021-06-23T12:24:00.451832Z 1 [Warning] [MY-012638] [InnoDB] Retry attempts for writing partial data failed.
jun 23 09:24:00 zabbix mysqld[2157]: 2021-06-23T12:24:00.452084Z 1 [ERROR] [MY-012639] [InnoDB] Write to file ./ibtmp1 failed at offset 4194304, 1048576 bytes should have been written, only 864256 were written. Operating system error num
jun 23 09:24:00 zabbix mysqld[2157]: 2021-06-23T12:24:00.452310Z 1 [ERROR] [MY-012640] [InnoDB] Error number 28 means 'No space left on device'
jun 23 09:24:00 zabbix mysqld[2157]: 2021-06-23T12:24:00.452566Z 1 [ERROR] [MY-012267] [InnoDB] Could not set the file size of './ibtmp1'. Probably out of disk space
jun 23 09:24:00 zabbix mysqld[2157]: 2021-06-23T12:24:00.452743Z 1 [ERROR] [MY-012926] [InnoDB] Unable to create the shared innodb_temporary.
jun 23 09:24:00 zabbix mysqld[2157]: 2021-06-23T12:24:00.452930Z 1 [ERROR] [MY-012930] [InnoDB] Plugin initialization aborted with error Generic error.
jun 23 09:24:00 zabbix mysqld[2157]: 2021-06-23T12:24:00.749417Z 1 [ERROR] [MY-010334] [Server] Failed to initialize DD Storage Engine
jun 23 09:24:00 zabbix mysqld[2157]: 2021-06-23T12:24:00.749911Z 0 [ERROR] [MY-010020] [Server] Data Dictionary initialization failed.
jun 23 09:24:00 zabbix mysqld[2157]: 2021-06-23T12:24:00.750148Z 0 [ERROR] [MY-010119] [Server] Aborting
jun 23 09:24:00 zabbix mysqld[2157]: 2021-06-23T12:24:00.750565Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.23)  MySQL Community Server - GPL.
jun 23 09:24:00 zabbix systemd[1]: mysql.service: Main process exited, code=exited, status=1/FAILURE
-- Subject: Unit process exited
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- An ExecStart= process belonging to unit mysql.service has exited.
--
-- The process' exit code is 'exited' and its exit status is 1.
jun 23 09:24:00 zabbix systemd[1]: mysql.service: Failed with result 'exit-code'.
-- Subject: Unit failed
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- The unit mysql.service has entered the 'failed' state with result 'exit-code'.
jun 23 09:24:00 zabbix systemd[1]: Failed to start MySQL Community Server.
-- Subject: A unidade mysql.service falhou
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- A unidade mysql.service falhou.
--
-- O resultado é failed.

Tinha um banco de dados já cadastrado e funcionando nele, parou durante a noite.
Testei o recover. (
Dei permissão (chown mysql:mysql /var/log/mysql/*)
Coloquei na confg do MySQL o comando

[mysqld]
innodb_force_recovery = 10

Mesmo assim sigo com erros.
Uso Debian

PRETTY_NAME="Debian GNU/Linux 10 (buster)"
NAME="Debian GNU/Linux"
VERSION_ID="10"
VERSION="10 (buster)"
VERSION_CODENAME=buster
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"
edited by MattIPv4

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
Submit an Answer
1 answer

Hi @michelhenriquesoares,

The issue you are experiencing can be seen in the log:

Error number 28 means 'No space left on device'

Your Droplet is full. You’ll need to either upgrade or find the culprint of the high disk usage and resolve it.

Additionally, I see you’ve added the following to your my.cnf:

innodb_force_recovery = 10

The values are from 0 to 6, so adding 10 will not achieve anything. Having said that, I strongly suggest you avoid using any more than 4 in the future.