'Error:mysqld.service: Start request repeated too quickly. On manjaro
Yesterday I updated my manjaro. I had many problems since then.
Firstly, I type
systemctl status mysqld.service
to start MySQL, but it errors out with
mysqld.service: Start request repeated too quickly.
I has found many suggestions but they doesn't work.
I already have tried:
Check the permission of the MySQL data directory using the below command. The ownership should be
mysql:mysqland the directory permission should be 700.ls -ld /var/lib/mysql/Check the permission of databases inside the MySQL data directory using the below command. The ownership should be
mysql:mysqlfor all the files inside that directory.ls -lh /var/lib/mysql/Check the listening network TCP ports using the command
netstat -ntlpCheck the MySQL log files for any error using:
cat /var/log/mysql/mysqld.logTry to start MySQL using
mysqld_safe --defaults-file=/etc/my.cf
My Error:
dong@dong-manjaro /home/dong systemctl status mysqld.service 13:30:33
● mysqld.service - MySQL Server
Loaded: loaded (/usr/lib/systemd/system/mysqld.service; disabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Thu 2019-08-22 13:30:29 CST; 6s ago
Docs: man:mysqld(8)
http://dev.mysql.com/doc/refman/en/using-systemd.html
Process: 8006 ExecStartPre=/usr/bin/mysqld_pre_systemd (code=exited, status=0/SUCCESS)
Process: 8027 ExecStart=/usr/bin/mysqld $MYSQLD_OPTS (code=exited, status=127)
Main PID: 8027 (code=exited, status=127)
8月 22 13:30:29 dong-manjaro systemd[1]: mysqld.service: Service RestartSec=100ms expired, scheduling restart.
8月 22 13:30:29 dong-manjaro systemd[1]: mysqld.service: Scheduled restart job, restart counter is at 5.
8月 22 13:30:29 dong-manjaro systemd[1]: Stopped MySQL Server.
8月 22 13:30:29 dong-manjaro systemd[1]: **mysqld.service: Start request repeated too quickly.**
8月 22 13:30:29 dong-manjaro systemd[1]: **mysqld.service: Failed with result 'exit-code'.**
8月 22 13:30:29 dong-manjaro systemd[1]: **Failed to start MySQL Server.**
Solution 1:[1]
Ran into similar issue.Follow steps(Sql server Version: '8.0.22-0ubuntu0.20.04.3')
1. Edit file: mysqld.cnf under directory: /etc/mysql/mysql.conf.d
2. Ensure that below basic settings are made in file mysqld.cnf and save it.
# * Basic Settings
user = mysql
pid-file = /var/run/mysqld/mysqld.pid
socket = /var/run/mysqld/mysqld.sock
port = 3306
datadir = /var/lib/mysql
# setting for localhost
bind-address = 127.0.0.1
mysqlx-bind-address = 127.0.0.1
log_error = /var/log/mysql/error.log
server-id = 1
log_bin = /var/log/mysql/mysql-bin.log
max_binlog_size = 100M
3. Check error log files under directory: /var/log/mysql
4. Remove all log files: Cd /var/log/mysql $ sudo rm -R error*
5. Start mysql server: $ sudo systemctl start mysql.service
6. Check status of mysql server: $ sudo systemctl status mysql.service
Solution 2:[2]
For us, it was to chown the logfile:
[root@tree ~]# ls -alh /var/log/mysqld.log
-rw-r----- 1 root logs 8.3K Apr 20 02:17 /var/log/mysqld.log
[root@tree ~]# chown mysql: /var/log/mysqld.log
[root@tree ~]# systemctl start mysqld
[root@tree ~]# systemctl status mysqld
? mysqld.service - MySQL Server
Loaded: loaded (/usr/lib/systemd/system/mysqld.service; enabled; vendor preset: disabled)
Active: active (running) since Tue 2021-04-20 15:32:01 UTC; 20s ago
Docs: man:mysqld(8)
http://dev.mysql.com/doc/refman/en/using-systemd.html
Process: 28339 ExecStart=/usr/sbin/mysqld --daemonize --pid-file=/var/run/mysqld/mysqld.pid $MYSQLD_OPTS (code=exited, status=0/SUCCESS)
Process: 28313 ExecStartPre=/usr/bin/mysqld_pre_systemd (code=exited, status=0/SUCCESS)
Main PID: 28342 (mysqld)
Memory: 43.3G
CGroup: /system.slice/mysqld.service
??28342 /usr/sbin/mysqld --daemonize --pid-file=/var/run/mysqld/mysqld.pid
Got rid of the same failure.
Solution 3:[3]
I have faced same issue and solved this problem like that:
if /var/log/mysql folder not exists:
sudo mkdir /var/log/mysql
and then give permission this folder:
sudo chown -R mysql:mysql /var/log/mysql
sudo systemctl stop mysql
sudo systemctl start mysql
Solution 4:[4]
I fixed like this:
sudo chown -R mysql:mysql /var/lib/mysql
sudo systemctl start mysql
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Hanumanth s |
| Solution 2 | Chaim Eliyah |
| Solution 3 | |
| Solution 4 | Dharman |
