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)05/31 Report--
This article will explain in detail how centos7 uses yum to install mysql 8.0.12. The editor thinks it is very practical, so I share it with you for reference. I hope you can get something after reading this article.
Clean up the original mysql
Rpm-qa | the possible display of grep mysql# is as follows # mysql-community-libs-8.0.12-1.el7.x86_64#mysql80-community-release-el7-1.noarch#mysql-community-client-8.0.12-1.el7.x86_64#mysql-community-common-8.0.12-1.el7.x86_64#mysql-community-server-8.0.12-1.el7.x86_64# is deleted by the following command Yum remove mysql-xxx-xxx-# finds mysql related files find /-name mysql# deletes mysql configuration file information rm-rf / var/lib/mysql according to its own needs
Delete CentOS7 default database mariadb
Rpm-qa | grep mariadb# looks for possible results in mariadb# mariadb-libs-5.5.56-2.el7.x86_64# forcibly deletes rpm-e-- nodeps mariadb-libs-5.5.56-2.el7.x86_64
Download mysql yum Feed
Mysql yum source download address
Click download to enter the download page
Mouse hovers over "No thanks, just start my download." You can view the address of the mysql yum source, and select the right copy link address to download.
Cd / usr/srcwget https://dev.mysql.com/get/mysql80-community-release-el7-1.noarch.rpm# install yum source yum localinstall mysql80-community-release-el7-1.noarch.rpm# update yum source yum clean allyum makecache# start installation MySQLyum install mysql-community-server# start MySQLsystemctl start mysqld# startup you can view the initialization password randomly generated cat / var/log/mysqld.log | grep password# login MySQL modify mysql user password Mysql-u root-pmysql > ALTER USER 'root'@'localhost' IDENTIFIED BY' yourpassword' # set the permission of mysql > use mysql;mysql > update user set host='%' where user='root';# authorized user name remotely, and grant any host the permission to access data: mysql > GRANT ALL PRIVILEGES ON *. * TO 'root'@'%'WITH GRANT OPTION;mysql > FLUSH PRIVILEGES
Several other methods of setting mysql user rights
# allow myuser users to connect to the mysql server GRANT ALL PRIVILEGES ON from any host using the mypassword password *. * TO 'myuser'@'%'IDENTIFIED BY' mypassword' WITH GRANT OPTION;# allows the user myuser to connect to the mysql server from the host with ip 192.168.1.6 and use mypassword as the password GRANT ALL PRIVILEGES ON *. * TO 'myuser'@'192.168.1.3'IDENTIFIED BY' mypassword' WITH GRANT OPTION
Related operations of database
# start mysqlsystemctl start mysqld.service#, end systemctl stop mysqld.service# restart systemctl restart mysqld.service# boot self-boot systemctl enable mysqld.service
After the password of the mysql login user is set, you need to develop a security group port
After the port is open, the database connection operation can be carried out. When using Navicat for MySQL to connect to Mysql 8.0.12, there may be a Client does not support authentication protocol error solution to the problem.
# modify the encryption rules (I haven't written this line, but it seems to be OK) the password needs to be formatted with uppercase and lowercase letters and numbers, otherwise the setting will not be super successful ALTER USER 'root'@'%' IDENTIFIED BY' password' PASSWORD EXPIRE NEVER; # update the user's password ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY' password'; # refresh permission FLUSH PRIVILEGES This is the end of this article on "how centos7 installs mysql 8.0.12 using yum". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, please share it out 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.