Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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:mysql and 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:mysql for all the files inside that directory.

    ls -lh /var/lib/mysql/
    
  • Check the listening network TCP ports using the command

    netstat -ntlp
    
  • Check the MySQL log files for any error using:

    cat /var/log/mysql/mysqld.log
    
  • Try 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.**
like image 494
UnionDong Avatar asked Aug 22 '19 06:08

UnionDong


People also ask

Can't connect to local MySQL server through?

normally means that there is no MySQL server running on the system or that you are using an incorrect Unix socket file name or TCP/IP port number when trying to connect to the server. You should also check that the TCP/IP port you are using has not been blocked by a firewall or port blocking service.


2 Answers

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
like image 91
Hanumanth s Avatar answered Sep 20 '22 16:09

Hanumanth s


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.

like image 32
Chaim Eliyah Avatar answered Sep 21 '22 16:09

Chaim Eliyah