E
E
Emil2021-12-02 17:46:43
linux
Emil, 2021-12-02 17:46:43

Why MySQL can't start?

Can't start mysql with error:

Dec 02 17:41:19 systemd[1]: mysql.service: Control process exited, code=exited status=1
Dec 02 17:41:19 systemd[1]: mysql.service: Failed with result 'exit-code'.
Dec 02 17:41:19 systemd[1]: Failed to start MySQL Community Server.
Dec 02 17:41:19  systemd[1]: mysql.service: Service hold-off time over, scheduling restart.
Dec 02 17:41:19  systemd[1]: mysql.service: Scheduled restart job, restart counter is at 5.
Dec 02 17:41:19 systemd[1]: Stopped MySQL Community Server.
Dec 02 17:41:19  systemd[1]: mysql.service: Start request repeated too quickly.
Dec 02 17:41:19 systemd[1]: mysql.service: Failed with result 'exit-code'.
Dec 02 17:41:19 systemd[1]: Failed to start MySQL Community Server.

Ubuntu 18.04. Why does this error occur and how can it be fixed?

Update. When starting /usr/bin/mysql it says
mysql: Can't read dir of '/etc/mysql/conf.d/' (Errcode: 2 - No such file or directory)
mysql: [ERROR] Fatal error in defaults handling. Program aborted!

And there really is no such folder. There are folders mariadb.conf.d, mysql, mysql.conf.d.
I changed the folder from conf.d to mysql.conf.d in /etc/mysqlmy.cnf now the error pops up
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
Kirill Larin, 2021-12-02
@heemsing

I assume that there is not enough RAM to run, try increasing the value innodb_buffer_pool_size
in the file /etc/my.cnf
Should help
And so look what the Mysql error log says/var/log/mysql/error.log

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question