Get the App
SLTechnology News&Howtos  ›  Database  › 

The processing of starting error report in MySQL Database

Shulou Source: shulou.com Published: 2022-06-01 08:58:19 09月22日 Update

mysql Starting MySQL in Linux

The server quit without updating PID file. Here's how to solve it.

I found a bunch of methods from the Internet as follows:

1. The requested URL/data/rekfan.pid was not found on this server.

Solution:

Give permission to execute "chown -R mysql:mysql /var/data"

"chmod -R 755 /usr/local/mysql/data" and restart mysqld!

2. There may already be a mysql process in the process

Solution:

Use the command "ps -ef| grep mysqld"See if there is a mysqld process

If there is a kill using "kill -9 process number" then restart mysqld!

3. Probably the second time mysql is installed on the machine, there is residual data affecting the service startup

Solution:

Go to mysql data directory/data to see if mysql-bin.index exists

Remove it quickly, it is the culprit. I am using the third method to solve!

4.mysql uses the/etc/my.cnf configuration file when no configuration file is specified at startup

Please open this file to see if there is a specified data directory (datadir) under the [mysqld] section

Solution: Please set this line under [mysqld]: datadir = /usr/local/mysql/data

5.Skip-federated field problem

Solution: Check if there are any uncommented skip-federated fields in/etc/my.cnf file, and comment them out immediately if there are any.

6. Error log directory does not exist

Workaround: Use the "chown" "chmod" command to give mysql owner and permissions

7.Selinux caused trouble, if it is centos system, selinux will be turned on by default

Solution:

Close it, open/etc/selinux/config, change SELINUX=enforcing to SELINUX=disabled and save to exit and restart the machine

The requested URL/usr/local/mysql/data was not found on this server.

Problem solving should be permission problem, localhost.localdomain.pid file cannot be generated

Tags: Methods files permissions directories processes data problems commands fields that is machines comments configurations culprits one line methods owners logs remnants culprits Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno MySQL OPPO Reno macOS Docker Shulou Tech Info