Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

After Linux installs mysql, it indicates that an error cannot log in to mysql. What should I do?

2025-02-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly explains the "Linux install mysql after the error can not log in mysql how to do", the article explains the content is simple and clear, easy to learn and understand, the following please follow the editor's ideas slowly in depth, together to study and learn "Linux install mysql after the error can not log in mysql how to do" it!

Mysql is a database, which is used to manage the data of the system, and it is widely used. In the operation of the Linux system, there is an error after installing mysql, resulting in the user being unable to log in. What should we do when we encounter this situation? The following editor will introduce to you the solution that Linux can not log on to mysql, let's learn about it.

Take centos system as an example

First of all:

Cp / usr/share/doc/MySQL-server-5.5.24/my-medium.cnf / etc/my.cnf

Secondly:

Touch / var/lib/mysql/mysql.scok

Check the database running status

/ etc/init.d/mysql status

Hint

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

Print the MYSQL process first

Ps aux | grep mysql

Then the KILL process

Kill-9 pid1 pid2...

Restart MYSQL

/ etc/init.d/mysql start

Check the running status of mysql again

/ etc/init.d/mysql status

Because at the beginning, I couldn't find the my.cnf file under / etc. Under / usr/share/doc/MySQL-server-5.5.24/, there was a my-default.cnf file. After reading it, it felt like my-medium.cnf, so I copied it to the etc directory to act as a my.cnf.

There are two ways to start mysql, one is tcp and the other is socket. Generally speaking, there is no problem with tcp startup, but the above problems occur only when socket starts.

Thank you for your reading, the above is the "Linux install mysql after the error can not log on to mysql how to do" the content, after the study of this article, I believe you can not login to Linux after the installation of mysql prompted errors can not login mysql how to do this problem has a more profound understanding, the specific use of the situation also needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report