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

mysql cannot be started in linux environment

王林
Release: 2019-12-03 11:10:35
Original
3849 people have browsed it

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
Copy after login
Copy after login

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

(2) Print MYSQL process

ps aux | grep mysql
Copy after login

mysql cannot be started in linux environment

(3) KILL process:

kill -9 pid
Copy after login

That is,

kill -9 9525
Copy after login

restart MYSQL:

service mysql start
Copy after login

and then check the mysql running status:

 service mysql status
Copy after login
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template