Linux can not log in mysql how to do?

  
                

mysql is a database, used to manage the system data, very widely used, Linux system operation, after the installation of mysql prompt error, resulting in users can not log in, what should I do in this situation? The following small series will introduce you to the solution that Linux can't log in to mysql. Let's take a look at it.

centos system as an example to

First:

cp /usr/share/doc/MySQL-server-5.5.24/my-medium.cnf /Etc/my.cnf

Next:

touch /var/lib/mysql/mysql.scok

View the database running status

/etc/Init.d/mysql status

Tips

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

Print MYSQL process first

ps aux

Copyright © Windows knowledge All Rights Reserved