In my Droplet suddenly mysql stopped working.
These are the logs i managed to find out.
Setting up mysql-server-8.0 (8.0.36-0ubuntu0.22.04.1) ...
mysqld will log errors to /var/log/mysql/error.log
2024-03-25T19:53:33.789764Z 0 [ERROR] [MY-010946] [Server] Failed to start mysqld daemon. Check mysqld error log.
Warning: Unable to start the server.
Job for mysql.service failed because the control process exited with error code.
See "systemctl status mysql.service" and "journalctl -xeu mysql.service" for details.
invoke-rc.d: initscript mysql, action "restart" failed.
● mysql.service - MySQL Community Server
Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled)
Active: activating (auto-restart) (Result: exit-code) since Mon 2024-03-25 19:53:42 UTC; 13ms ago
Process: 2563565 ExecStartPre=/usr/share/mysql/mysql-systemd-start pre (code=exited, status=0/SUCCESS)
Process: 2563573 ExecStart=/usr/sbin/mysqld (code=exited, status=1/FAILURE)
Main PID: 2563573 (code=exited, status=1/FAILURE)
Status: "Server shutdown complete"
Error: 22 (Invalid argument)
CPU: 1.994s
Mar 25 19:53:42 ghostonubuntu2204-s-1vcpu-1gb-intel-fra1-01 systemd[1]: mysql.service: Failed with result 'exit-code'.
Mar 25 19:53:42 ghostonubuntu2204-s-1vcpu-1gb-intel-fra1-01 systemd[1]: Failed to start MySQL Community Server.
Mar 25 19:53:42 ghostonubuntu2204-s-1vcpu-1gb-intel-fra1-01 systemd[1]: mysql.service: Consumed 1.994s CPU time.
Mar 25 19:53:42 ghostonubuntu2204-s-1vcpu-1gb-intel-fra1-01 systemd[1]: mysql.service: Scheduled restart job, restart counter is at 1.
Mar 25 19:53:42 ghostonubuntu2204-s-1vcpu-1gb-intel-fra1-01 systemd[1]: Stopped MySQL Community Server.
Mar 25 19:53:42 ghostonubuntu2204-s-1vcpu-1gb-intel-fra1-01 systemd[1]: mysql.service: Consumed 1.994s CPU time.
Mar 25 19:53:42 ghostonubuntu2204-s-1vcpu-1gb-intel-fra1-01 systemd[1]: Starting MySQL Community Server...
dpkg: error processing package mysql-server-8.0 (--configure):
installed mysql-server-8.0 package post-installation script subprocess returned error exit status 1
dpkg: dependency problems prevent configuration of mysql-server:
mysql-server depends on mysql-server-8.0; however:
Package mysql-server-8.0 is not configured yet.
dpkg: error processing package mysql-server (--configure):
dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
Processing triggers for libc-bin (2.35-0ubuntu3.6) ...
Errors were encountered while processing:
mysql-server-8.0
mysql-server
needrestart is being skipped since dpkg has failed
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
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.
Heya,
Apart from diskspace being the proble, can you provide the mysql error log? It should be in
/var/log/mysql/error.log
. Provide the last lines that would related to the problem itself.Hi there,
Do you have enough disk space on your server? You can check that with:
If you don’t have enough disk space, MySQL might not function correctly and you risk corrupting your data. If this is the case, you would need to clear up some disk space or add more disk space.
If you do have enough disk space, the first step is to examine the MySQL error log, which is mentioned in your logs as
/var/log/mysql/error.log
.This file should contain more specific details about what went wrong. Use the command
sudo cat /var/log/mysql/error.log
to view the contents of this log file.Feel free to share the output from the error log here as well.
Best,
Bobby