Home  >  Article  >  Operation and Maintenance  >  mysql cannot be started in linux environment

mysql cannot be started in linux environment

王林
王林Original
2019-12-03 11:10:353807browse

mysql cannot be started in linux environment

No matter what kind of problem is found, first check the err log.

Question 1:

Querying the err log shows permission issues.

Analysis: mysql originally belongs to the mysql user. If it is started under the root user, problems may occur.

Solution:

(1) Check the permissions of mysql

mysql cannot be started in linux environment

(2) Found that there is root permission, which is confusing. So first change it to mysql permission

Related video tutorial recommendation:linux video tutorial

mysql cannot be started in linux environment

(3) Restart and view the process

mysql cannot be started in linux environment

Question 2:

When I changed the mysql password, I found that the mysql service was running normally, but when I logged in, it prompted: ERROR! MySQL is running but PID file could not be found

Solution:

(1) Check the database running status:

 service mysql status

PromptERROR! MySQL is running but PID file could not be found

(2) Print MYSQL process

ps aux | grep mysql

mysql cannot be started in linux environment

(3) KILL process:

kill -9 pid

That is,

kill -9 9525

restart MYSQL:

service mysql start

and then check the mysql running status:

 service mysql status

prompts successful OK

(4) Change password

mysql cannot be started in linux environment

Recommended related articles and tutorials: linux tutorial

The above is the detailed content of mysql cannot be started in linux environment. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn