In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
MySQL installation
I. system environment
Centos7 or REHL7
Download the MySQL rpm installation package (here, take 5.7 as an example)
There is no need to say much about the specific download methods, there are many on the Internet.
Delete the MariaDB database that comes with the system.
Rpm-qa | grep-I mariadb
Rpm-e-nodeps mariadb-libs
Rm-rf / etc/my.cnf
Fourth, install related dependency packages
Yum-y install perl-Data-Dumper.x86_64 perl-JSON
Upgrade and install MySQL
Tar-xvf mysql-5.7.17-1.el7.x86_64.rpm-bundle.tar
Rm-rf mysql-community-server-minimal-5.7.17-1.el7.x86_64.rpm # remove minimum installation
Rpm-Uvh mysql-community-*.rpm
Systemctl start mysqld
Systemctl enable mysqld
Systemctl status mysqld
All right, the installation of MySQL is complete here. Additional information such as the process port of MySQL is attached:
Service name: mysqld
Process name: mysqld
Master / group of the process: mysql/mysql
Port number: TCP/3306
Main profile location: / etc/my.cnf
Database directory location: / var/lib/mysql
Initial MySQL login password modification
First, view the log file
Grep-I "password" / var/log/mysqld.log
You can see that there is a string of characters and passwords. Copy them down.
Log in to MySQL with the password found
Mysql-hlocalhost-uroot-p "Y1jNtb50Hd+x" # Note here: use single quotation marks if there is a special symbol.
Change the temporary password
Mysql > set global validate_password_policy=0
Mysql > set global validate_password_length=6
Mysql > alter user root@ "localhost" identified by "123456"
Mysql-hlocalhost-uroot-p123456 # re-log in to the database with the changed password
Mysql > show databases; # can see the concrete library
IV. Permanent password policy: modify the configuration file
Vim / etc/my.cnf
[mysqld]
Validate_password_policy=0
Validate_password_length=6
Systemctl restart mysqld # restart the service
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.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.