Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to install mysql in rpm mode under centos 6.9

2025-01-14 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

The following is about how to install mysql in rpm under centos 6.9. the secret of the text lies in being close to the topic. So, no gossip, let's go straight to the following, I believe you will benefit from reading this article on how to install mysql in rpm under centos 6.9.

Rpm installation of mysql on centos 6.9

Environment:

Linux:CentOS release 6.9 64bit

MySQL: mysq-5.7.18

1. Create a mysql directory in / home and download the following four software packages

Http://mirrors.sohu.com/mysql/MySQL-5.7/

Wget http://mirrors.sohu.com/mysql/MySQL-5.7/mysql-community-client-5.7.18-1.el6.x86_64.rpm

Wget http://mirrors.sohu.com/mysql/MySQL-5.7/mysql-community-common-5.7.18-1.el6.x86_64.rpm

Wget http://mirrors.sohu.com/mysql/MySQL-5.7/mysql-community-libs-5.7.18-1.el6.x86_64.rpm

Wget http://mirrors.sohu.com/mysql/MySQL-5.7/mysql-community-server-5.7.18-1.el6.x86_64.rpm

2. Check whether mysql rpm-related packages are installed and removed

[root@centos-6 mysql] # rpm-qa | grep-I mysql

Mysql-libs-5.1.73-8.el6_8.x86_64

[root@centos-6 mysql] # rpm-e mysql-libs-5.1.73-8.el6_8.x86_64

Error: Failed dependencies:

Libmysqlclient.so.16 () (64bit) is needed by (installed) postfix-2:2.6.6-8.el6.x86_64

Libmysqlclient.so.16 (libmysqlclient_16) (64bit) is needed by (installed) postfix-2:2.6.6-8.el6.x86_64

Mysql-libs is needed by (installed) postfix-2:2.6.6-8.el6.x86_64

[root@centos-6 mysql] #

Delete the dependency package as well

[root@centos-6 mysql] # yum remove-y mysql-libs

Check again whether the deletion is clean.

[root@centos-6 mysql] # rpm-qa | grep-I mysql

[root@centos-6 mysql] #

3. Install four rpm packages at the same time

Rpm-ivh mysql-community-client-5.7.18-1.el6.x86_64.rpm mysql-community-common-5.7.18-1.el6.x86_64.rpm mysql-community-libs-5.7.18-1.el6.x86_64.rpm mysql-community-server-5.7.18-1.el6.x86_64.rpm

4. Lack of dependency package solution

[root@centos-6 home] # rpm-ivh mysql-community-client-5.7.18-1.el6.x86_64.rpm mysql-community-common-5.7.18-1.el6.x86_64.rpm mysql-community-libs-5.7.18-1.el6.x86_64.rpm mysql-community-server-5.7.18-1.el6.x86_64.rpm

Warning: mysql-community-client-5.7.18-1.el6.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY

Error: Failed dependencies:

Libnuma.so.1 () (64bit) is needed by mysql-community-server-5.7.18-1.el6.x86_64

Libnuma.so.1 (libnuma_1.1) (64bit) is needed by mysql-community-server-5.7.18-1.el6.x86_64

Libnuma.so.1 (libnuma_1.2) (64bit) is needed by mysql-community-server-5.7.18-1.el6.x86_64

[root@centos-6 home] # yum install-y numactl

5. Password acquisition

Obtain the temporary password of MySQL for the first time through the # grep "password" / var/log/mysqld.log command

After logging in to the server with this password, you must change the password immediately, otherwise you will make an error in querying the Times.

The password you just set must match the length and must contain numbers, lowercase or uppercase letters, and special characters.

If you want to set a simple password, do the following:

First, modify the value of the validate_password_policy parameter

Mysql > set global validate_password_policy=0; # define complexity

Mysql > set global validate_password_length=1; # defines a length of 8 by default

Mysql > set password for 'root'@'localhost'=password (' 123456'); # set the root password to 123456

Mysql > flush privileges; # refresh permission to make the configuration effective

Is there anything you don't understand about how to install mysql in rpm mode under centos 6.9 above? Or if you want to know more about it, you can continue to follow our industry information section.

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.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report