In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-05 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
This article shows you how to install Mysql5.7 through rmp in Centos6. The content is concise and easy to understand. It will definitely brighten your eyes. I hope you can get something through the detailed introduction of this article.
The first step
Download the installation package:
Mysql-community-client-5.7.27-1.el6.x86_64.rpm
Mysql-community-server-5.7.27-1.el6.x86_64.rpm
Step two
Check to see if mysql is installed:
[root@localhost install] # rpm-qa | grep-I mysql
Mysql-libs-5.1.73-7.el6.x86_64
Installed and cleared the original mysql installation package
Execute the command: rpm-e mysql-libs-5.1.73-7.el6.x86_64 clear, clear packet dependency can not clear the error in the following figure. Execute the command rpm-e-- nodeps mysql-libs-5.1.73-7.el6.x86_64 to force qa, and then use rpm-qa again | grep-I mysql
Check to see if the cleanup is complete
Step three
Install MySQL-server
a. Execute the command: rpm-ivh mysql-community-server-5.7.27-1.el6.x86_64.rpm with the following error reported.
b. Execute the command yum-y install perl.x86_64 to install the plug-in perl
c. Execute the command again: rpm-ivh mysql-community-server-5.7.27-1.el6.x86_64.rpm, reporting the following error.
d. Execute the command: rpm-ivh mysql-community-server-5.7.27-1.el6.x86_64.rpm-- force-- nodeps. The installation is completed as shown below:
The fourth step
Install MySQL-client
Execute the command: rpm-ivh mysql-community-client-5.7.27-1.el6.x86_64.rpm-- force-- nodeps, and the installation is completed as shown below.
Step five
Start the service
Execute command: service mysqld restart (used to this) can also be used with service mysqld start
Step six
Find the default password
Execute the command: grep 'temporary password' / var/log/mysqld.log
Step 7
Log in for the first time
a. Execute the command: mysql-uroot-p, and the result is as follows
b. Execute the command: change the password after entering show databases;, for the first time, or you can't operate it. It will report an error as shown in the following figure.
c. Change the password and exit, execute the command: alter user root@localhost identified by 'Eddue,123';, note that changing the password has a default password strength: 1. At least 8 characters 2. Contains uppercase and lowercase letters 3. There should be punctuation.
d. Log in again with a new password to view and other operations, as shown in the figure below.
Step 8
Modify mysql default port
a. Execute the command: vi / etc/my.cnf, edit my.cnf, add port=5506 settings port and save, as shown in the following figure
b. Execute command: restart the mysql service, service mysqld restart failed. Using the command tail-f / var/log/mysqld.log-n500, look at the log and you will find that the port cannot be bound when an error is reported.
c. The solution is as follows: method 1 of the solution 2 I tried
Solution 1. Firewall issu
Vi / etc/sysconfig/iptables
Add the following line:
-An INPUT-m state-- state NEW-m tcp-p tcp-- dport 8060-j ACCEPT
Restart the firewall
Service iptables restart
Solution 2. SELinux problem
Method A temporary solution: no need to restart Linux:
[root@dytl05 ~] # setenforce 0
Method 2: restart Linux:
Vi / etc/selinux/config
SELINUX=disabled
Restart the mysql service again, execute the command service mysqld restart again, and restart successfully.
Use the command: netstat-an | whether the port of grep 5506 MySQL service has been modified.
The above is how to install Mysql5.7 through rmp in Centos6. Have you learned any knowledge or skills? If you want to learn more skills or enrich your knowledge reserve, you are 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.