In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article "rpm in centos how to install mysql" is not understood by most people except programmers. Today, in order to make you better understand "how to install mysql in centos", Xiaobian summed up the following content, which has a certain reference value. The detailed steps are clear and the details are handled properly. I hope you can get something through this article. Let's take a look at the specific content.
Methods: 1, download rpm file with "yum-y install mysql57-community-release-el7-10.noarch.rpm" command; 2, install it with "yum install-y mysql-server mys" command.
The operating environment of this tutorial: linux7.3 system, mysql8.0.22 version, Dell G3 computer.
How to install mysql in rpm in centos
1. Check if the server has MySQL installed
Rpm-qa | grep-I mysql
1.1 if there is a deletion, do not proceed to the next step
Yum remove mysql mysql-server mysql-libs compat-mysql51 rm-rf / var/lib/mysql rm / etc/my.cnf
Check again after the deletion is completed. If so, continue to delete the existing name of yum remove.
two。 Download the MySQL RPM file
Wget-I-c http://dev.mysql.com/get/mysql57-community-release-el7-10.noarch.rpm yum-y install mysql57-community-release-el7-10.noarch.rpm
2.1 install MySQL (just Y all the time)
Yum install-y mysql-server mysql mysql-deve
2.2 check whether the installation is successful after the installation is completed
Rpm-qi mysql-community-server
3 start the mysql service
Systemctl start mysqld.service
3.1 View startup status
Systemctl status mysqld.service
3.2 View the original password
Grep "password" / var/log/mysqld.log
Log in to MySQL according to your original password
Mysql-u root-p
4. Change the MySQL default password
ALTER USER 'root'@'localhost' IDENTIFIED BY' new password'
The new password set for you by new password Note: the password must be set with uppercase and lowercase alphanumerics and special symbols (, /';:, etc.), otherwise it cannot be configured successfully
5. Configure remote services
Execute the following command to turn on remote access restrictions (Note: the IP enabled by the following command is 192.168.0.1, if you want to turn on all, use% instead of IP)
Grant all privileges on *. * to 'root'@'%' identified by' password' with grant option
The password that password set for himself. Then enter the following two lines of commands
Flush privileges; exit
6. Modify MySQL language
First log in to mysql again, then enter status:
As you can see, the green arrow is not utf-8.
So let's exit mysql first, and then modify the contents of the file under the my.cnf file in the etc directory.
Add four lines of code after entering the file
The code is
[client] default-character-set=utf8 character-set-server=utf8 collation-server=utf8_general_ci
After saving the changed my.cnf file, restart mysql, then type status to view it again, and you will find the change.
If the MySQL login error is reported after reboot, please use the above 3.1 to check whether the startup status of MySQL is
If not, please use the above 3 to start MySQL, log in to MySQL to check the character format after checking the startup status is correct
Thank you for your reading. I hope you have a certain understanding of the key issue of "how to install mysql in rpm in centos". The specific usage still needs to be understood by hands-on experiments. Try it quickly. If you want to read more articles about relevant knowledge points, welcome to follow the industry information channel!
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.