In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
How to build MySQL database on CVM Centos7? Many people don't know much about it. Today, in order to give you a better understanding of how to build a MySQL database on Centos7 on CVM, let's summarize the following. Let's take a look at it.
Download the yum source of MySQL
Centos7 does not have a yum source for MySQL. We download different versions of the source to install different versions of MySQL. You can choose to download it yourself or follow the selected commands below.
Wget http://repo.mysql.com/mysql57-community-release-el7-8.noarch.rpm
Install and download the rpm file
Rpm-ivh mysql57-community-release-el7-8.noarch.rpm
3. Yum installs Mysql
Yum install mysql-server
4. Try logging in to MySQL
Mysql-uroot-proot
This place may report an error:
Can't connect to local MySQL server through socket'/ var/lib/mysql/mysql.sock' (2)
This is a / var/lib/mysql permission issue. Change the MySQL permission to the current user.
Sudo chown-R xxx:xxx / var/lib/mysql
Xxx is the current user name and group to which it belongs
Restart the MySQL service
Service mysqld restart
5. Login failure to obtain initial password
Cat / var/log/mysqld.log | grep password
Where A temporary password is generated for root@localhost: * localhost: is followed by the initial password.
Mysql-uroot-p
Enter the password to log in
Change the initial password after a successful login
Set global validate_password_policy=0;set global validate_password_length=4;alter user 'root'@'localhost' identified by' root'
In this way, the installation of MySQL is complete!
This is the end of how to build a MySQL database on CVM Centos7. Of course, there are not only the above methods to analyze with you, but the editor can ensure its accuracy. I hope that the above content can have a certain reference value for everyone, and can be put into practice. If you like this article, you might as well share it for more people to see.
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.