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

Specific steps to install mysql5.7 using rpm and source package under linux

2025-04-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

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

This article mainly introduces the specific steps of installing mysql5.7 using rpm and source package under linux. The content of the article is carefully selected and edited by the author. It has certain pertinence and reference significance for everyone. The following is to understand the specific steps of installing mysql5.7 using rpm and source package under linux.

I. Download MySQL rpm package

Mysql 5.7.19 can be downloaded from:

http://dev.mysql.com/downloads/mysql/

You'll find versions of all the systems mysql supports, as follows:

Here we select the 64-bit mysql rpm package for Red Hat Enterprise Linux / Oracle Linux version 6

Second, install and configure mysql rpm package

Mysql officially recommends that we use rpm packages to install mysql

The specific rpm package installation steps are as follows:

We can see a lot of packages unzipped, explained as follows:

mysql-community-server-5.7.19-1.el6.x86_64.rpm: server-side installation package

mysql-community-client-5.7.19-1.el6.x86_64.rpm: Client installation package

mysql-community-devel-5.7.19-1.el6.x86_64.rpm: Contains library header files for development

mysql-community-test-5.7.19-1.el6.x86_64.rpm: some tested installation packages

mysql-community-embedded-5.7.19-1.el6.x86_64.rpm: Installation package for embedded mysql

mysql-community-libs-5.7.19-1.el6.x86_64.rpm: mysql shared library installation package

mysql-community-community-5.7.19-1.el6.x86_64.rpm: MySQL configuration installation package

mysql-community-libs-compat-5.7.19-1.el6.x86_64.rpm: mysql compatibility library installation package

mysql-community-embedded-devel-5.7.19-1.el6.x86_64.rpm: Installation package for embedded development libraries

In fact, there are so many packages, some of which we don't use. Under normal circumstances, we only install client and server packages. If your company needs to carry out c/c++mysql related development, install mysql-community-devel-5.7.19-1.el6.x86_64.rpm package as well.

You can see that we install the server and client packages, there will be dependent packages, then we will install the dependent packages first

We found that installing mysql-community-common this package reported a lot of errors, this is because when installing the system, mysql is installed by default, and the lower version of the lib shared library must also be installed. We are now installing a higher version of mysql, which is incompatible with each other. Therefore, we have to uninstall the higher version of the lib shared library that we just extracted.

In this case, even if our mysql 5.7.19 installation is complete, we need to modify the root password of mysql next, the steps are as follows:

We can see that this way of changing passwords is not feasible, so what should we do?

We adopt another method of changing passwords, which includes the following steps:

1) First determine whether mysql service is stopped, if not, please stop

2) Safe mode start

3) Enter mysql without entering password (i.e. log in without password)

4) Manual update to change password

Note: Version 5.7 of mysql does not have the password field in the mysql library, replaced by the authentication_string field.

5) Exit, restart mysql service and test password

The installation of mysql 5.7 is complete.

Mysql is installed. The mysql Cloud Virtual Machine directory includes the following subdirectories. I need to tell you about them:

folder

folder content

/usr/bin

Client and Script

/usr/sbin

MySQLD Cloud Virtual Machine

/var/lib/mysql

log files and database

/usr/share/info

Information Format Manual

/usr/share/man

UNIX Help Page

/usr/include/mysql

header file

/usr/lib/mysql

library

/usr/share/mysql

Error messages, character sets, sample profiles, and more

Here we are talking about how to install mysql with mysql source package

Log in to the following URL:

Note: this example takes downloading and installing linux version 6 as an example.

After downloading, the following operation will start compiling and installing:

As can be seen from the above figure, there are three dependency packages compiled and installed. The following is to solve this problem. First, we should explain that the first dependency package cmake28 is not cmake28 installed by yum, but the dependency package installed by epel source. The other two yum installations can be done. Here are the specific steps:

1) Download epel source

wgettp://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm is the epel source for linux 6.x

wgettp://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-10.noarch.rpm is the epel source for linux 7.x

Because this example is centos 6.8, download version 6 of the epel source

2) Install epel source

Install cmake28

Note: If your network speed is not good, it is estimated that the installation of cmake28 will report errors, but do not worry, more than a few times can be executed.

4) yum install libaio-devel and numactl-devel

5) Now compile and install mysql source package

Note: This compilation process is quite long, blogger personally tested about 5 hours, in the middle of several places it is stuck has not moved. After compiling and installing, it is the rpm package, and then the work is to install the rpm package according to the method described above, so as a beginner mysql user, it is not recommended to use the source package compilation and installation.

After reading the above specific steps on installing mysql5.7 using rpm and source package under linux, many readers must have some understanding, if you need to obtain more industry knowledge information, you can continue to pay attention to our industry information column.

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