当前位置:网站首页>Viewing MySQL password on Linux_ MySQL forgets password "suggestions collection" under Linux

Viewing MySQL password on Linux_ MySQL forgets password "suggestions collection" under Linux

2022-06-25 02:01:00 Full stack programmer webmaster

Hello everyone , I meet you again , I'm your friend, Quan Jun .

1、 the front

Install on the server today mysql after , Login found password error , But I didn't set the password , Finally, baidu learned that ,mysql stay 5.7 An initial password will be automatically created after version .

An error is as follows :

[[email protected] ~]#mysql -u root -p

Enter password:

ERROR1045 (28000): Access denied for user ‘root’@’localhost’ (using password: YES)

2、 Check MySQL Whether the service starts

First check MySQL Whether the service starts , If you start , Shut down first MySQL service .

// see mysql Service status

[[email protected] ~]#ps -ef | grep -i mysql

root 22972 1 0 14:18 pts/0 00:00:00 /bin/sh /usr/bin/mysqld_safe –datadir=/var/lib/mysql –socket=/var/lib/mysql/mysql.sock –pid-file=/var/run/mysqld/mysqld.pid –basedir=/usr –user=mysql

mysql23166 22972 0 14:18 pts/0 00:00:00 /usr/sbin/mysqld –basedir=/usr –datadir=/var/lib/mysql –plugin-dir=/usr/lib/mysql/plugin –user=mysql –log-error=/var/log/mysqld.log –pid-file=/var/run/mysqld/mysqld.pid –socket=/var/lib/mysql/mysql

Publisher : Full stack programmer stack length , Reprint please indicate the source :https://javaforall.cn/151776.html Link to the original text :https://javaforall.cn

原网站

版权声明
本文为[Full stack programmer webmaster]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/176/202206242153197774.html