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

Centos7 initializes the MySQL5.7 database

2025-04-09 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

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

Centos7 initializes the MySQL5.7 database

Since there was no specific description of how to install MySQL5.7 under Centos7 in the previous article

An important step before you start using the database is to initialize the database. So today I would like to make up this specific operation of the article.

1. Start the database

Systemctl start mysqld

2. Set self-boot.

Systemctl enable mysqld

3. View the default database password

Cat / var/log/mysqld.log | grep password

Note: if you change the database password before initializing the database as I did in the previous article, then this step can be omitted.

4. Initialize the database

Mysql_secure_installation

Note: after executing the initialization command, you need to enter the database root user password, and then enter all the way by default as the screenshot above. (the above screenshot questions can also be selected according to your own actual situation)

5. Log in to MySQL

Mysql-uroot-p

Note: the above also completed all the operations of initializing the database!

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

Database

Wechat

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

12
Report