In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
1. Mariadb is installed by default in CentOS, so check whether mariadb is installed first. If it is installed, mariadb needs to be uninstalled first.
rpm -qa|grep mariadbrpm -e mariadb-libs --nodeps
Create mysql folder in/usr/local/directory
cd /cd usr/localmkdir mysql
3. Enter the mysql folder and download mysql
cd mysqlwget https://dev.mysql.com/get/Downloads/MySQL-8.0/mysql-8.0.16-2.el7.x86_64.rpm-bundle.tar
Unzip mysql to the current directory
tar -xvf mysql-8.0.16-2.el7.x86_64.rpm-bundle.tar
5. Install mysql and execute the following commands in turn
rpm -ivh mysql-community-common-8.0.16-2.el7.x86_64.rpm --nodeps --forcerpm -ivh mysql-community-libs-8.0.16-2.el7.x86_64.rpm --nodeps --forcerpm -ivh mysql-community-client-8.0.16-2.el7.x86_64.rpm --nodeps --forcerpm -ivh mysql-community-server-8.0.16-2.el7.x86_64.rpm --nodeps --force
6, initialization and related configuration, in turn, execute the following commands
mysqld --initialize; chown mysql:mysql /var/lib/mysql -R;systemctl start mysqld.service;systemctl enable mysqld;
If mysqld --initialize is executed; the following error occurs, first execute yum -y install numactl, and then execute mysqld --initialize;
If you execute systemctl start mysqld.service; the following error occurs, execute tail-f/var/log/mysqld.log to view the error log first
If the error log is as follows, execute cd /var/lib/mysql, execute rm -rf * to delete all files, and then execute systemctl start mysqld.service;
7. View database initialization password
cat /var/log/mysqld.log | grep password
8. Log in to the database, copy and paste the initialization password, the login password will not be displayed, press the Enter key
mysql -uroot -p
9, modify the password, password needs numbers, upper and lower case letters, special symbols
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'xxxxx';
10. Exit mysql and log in again with the new password to verify whether the password has been modified successfully.
exit; mysql -uroot -p
11. Create a remote access user by executing the following commands in sequence
create user 'root'@'%' identified with mysql_native_password by 'xxxxx';grant all privileges on *.* to 'root'@'%' with grant option;flush privileges;
12. General servers do not have a default port 3306. You need to configure a security group in the server console.
summary
The above is a detailed explanation of the steps of CentOS7.6 installation MYSQL8.0 introduced by Xiaobian. I hope it will help you. If you have any questions, please leave a message to me. Xiaobian will reply to you in time. Thank you very much for your support!
If you think this article is helpful to you, welcome to reprint, please indicate the source, thank you!
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.