What to do if Linux cannot start mysql

藏色散人
Release: 2020-05-30 10:48:22
Original
3739 people have browsed it

What to do if Linux cannot start mysql

What should I do if mysql cannot be started on Linux?

In the one-click lnmp environment installed by the company, when I started mysql, I found that mysql.sock did not exist.

Then I searched and finally found it in /usr/local/mysql/bin /mysql_safe Restart

Then start service mysql start

What to do if Linux cannot start mysql

View service mysql status

What to do if Linux cannot start mysql

There are various opinions on the Internet. In fact, it is better to find it in your own installation directory, and then slowly solve it

At this time, I entered mysql and found that the password was wrong. Then I tried the initial password. Root found a new problem

What to do if Linux cannot start mysql

This directly enters /etc/my.cnf for editing

What to do if Linux cannot start mysql

Restart mysql again

What to do if Linux cannot start mysql

Then you can enter this time Enter mysql

What to do if Linux cannot start mysql

update user set password=password("") where user="root";
Copy after login

What to do if Linux cannot start mysql

and then return Go to the vim /etc/my.cnf and comment out the sentence you just added. Restart mysql again and it will be ok.

create database [dataname] Create a database

show databases; Check it out You can perform database operations

Recommended learning: "linux tutorial"

The above is the detailed content of What to do if Linux cannot start mysql. 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
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!