Home > Database > Mysql Tutorial > body text

Where can I find the initial password of mysql?

王林
Release: 2020-09-29 14:29:23
Original
12378 people have browsed it

The initial password of mysql can be viewed in the log. The specific method is: first log in to mysql; then execute the [grep 'temporary password' /var/log/mysqld.log] statement.

Where can I find the initial password of mysql?

How to view the initial password:

(Recommended tutorial: mysql tutorial)

Start mysql

systemctl start mysqld
Copy after login

View mysql status

systemctl status mysqld
Copy after login

Log in to the database

mysql -u root -p
Copy after login

After starting mysql, the initial password will be written to the log

Use the following command View

grep 'temporary password'  /var/log/mysqld.log
Copy after login

Where can I find the initial password of mysql?

Related recommendations: php training

The above is the detailed content of Where can I find the initial password of 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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template