'Mysql: can't start mysqld "mysqld.service: control process exited, code=exited status=1"
I have installed a third party framework fate
, and mysql
has been installed inside this framework, at the following path: /data/projects/fate/common/mysql/mysql-8.0.28
.
I have copied /data/projects/fate/common/mysql/mysql-8.0.28/conf/my.conf
to /etc/my.cnf
and the content is:
[mysqld]
port=3306
basedir=/data/projects/fate/common/mysql/mysql-8.0.28
datadir=/data/projects/fate/data/mysql
socket=/data/projects/fate/common/mysql/mysql-8.0.28/run/mysql.sock
max_connections=10000
max_connect_errors=10
character-set-server=utf8
default-storage-engine=INNODB
default_authentication_plugin=mysql_native_password
mysqlx=0
[mysql]
default-character-set=utf8
[client]
port=3306
default-character-set=utf8
socket=/data/projects/fate/common/mysql/mysql-8.0.28/run/mysql.sock
[mysqld_safe]
log-error=/data/projects/fate/common/mysql/mysql-8.0.28/logs/mysqld.log
pid-file=/data/projects/fate/common/mysql/mysql-8.0.28/run/mysqld.pid
but when I try to start mysqld with systemctl start mysqld
, I get:
Job for mysqld.service failed because the control process exited with error code. See "systemctl status mysqld.service" and "journalctl -xe" for details.
after systemctl status mysqld.service
● mysqld.service - LSB: start and stop MySQL
Loaded: loaded (/etc/rc.d/init.d/mysqld; bad; vendor preset: disabled)
Active: failed (Result: exit-code) since Sat 2022-05-14 16:27:43 CST; 13s ago
Docs: man:systemd-sysv-generator(8)
Process: 20483 ExecStart=/etc/rc.d/init.d/mysqld start (code=exited, status=1/FAILURE)
May 14 16:27:41 vm-0-1-centos systemd[1]: Starting LSB: start and stop MySQL...
May 14 16:27:43 vm-0-1-centos mysqld[20483]: Starting MySQL..The server quit without updating PID file (/data/projects/fate/data/mysql/vm-0-1-centos.pid).[FAILED]
May 14 16:27:43 vm-0-1-centos systemd[1]: mysqld.service: control process exited, code=exited status=1
May 14 16:27:43 vm-0-1-centos systemd[1]: Failed to start LSB: start and stop MySQL.
May 14 16:27:43 vm-0-1-centos systemd[1]: Unit mysqld.service entered failed state.
May 14 16:27:43 vm-0-1-centos systemd[1]: mysqld.service failed.
or when using service mysqld start
, the problem is
Starting MySQL.The server quit without updating PID file (/data/projects/fate/data/mysql/vm-0-1-centos.pid).[FAILED]
I have tried a lot of solution from other questions, and I'm stuck and upset now.
I don't want to reinstall mysql again because I'm afraid that another mysql may affect the third party framework fate
working.
Solution 1:[1]
You can try checking:
- MySQL error log file
- Privileges for MySQL catalogue
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 | lemon |