Build MySQL in a Linux environment

Source: Internet
Author: User
Tags gpg mysql in sha1

Linux under a lot of ways to build MySQL, online also explained a lot of ways to build, there are direct yum, have rpm, in short, "pit" is endless, there are related file dependencies, permissions, GPG keys and so on.

I also set up a bit today, is out of the "pit", has been recorded.

--------------------------------------------------------------------------------

The way to build this is to use the RPM way to build.

Related RPM Package:https://pan.baidu.com/s/1ADAJ0p48_3fiOtijSd9QUQ Password: Z1ZM (version 5.7)


The first step: upload the package to the server for decompression:

TAR-XVF Mysql-5.7.16-1.el6.x86_64.rpm-bundle.tar

Several RPM files will appear after decompression:

mysql-community-client-5.7.16-1.el6.x86_64.rpm

mysql-community-common-5.7.16-1.el6.x86_64.rpm

mysql-community-devel-5.7.16-1.el6.x86_64.rpm

mysql-community-embedded-5.7.16-1.el6.x86_64.rpm

mysql-community-embedded-devel-5.7.16-1.el6.x86_64.rpm

mysql-community-libs-5.7.16-1.el6.x86_64.rpm

mysql-community-libs-compat-5.7.16-1.el6.x86_64.rpm

mysql-community-server-5.7.16-1.el6.x86_64.rpm

mysql-community-test-5.7.16-1.el6.x86_64.rpm

Step Two: install using the RPM-IVH xxxxx command (remember: order to ensure synchronization, dependencies between file installations)

  

1, Rpm-ivh mysql-community-common-5.7.16-1.el6.x86_64.rpm, appears the following content:

  

Warning:mysql-community-common-5.7.16-1.el6.x86_64.rpm:header V3 dsa/sha1 Signature, key ID 5072e1f5:nokeypreparing ... ########################################### [100%]file/usr/share/mysql/czech/errmsg.sys from Install O F mysql-community-common-5.7.16-1.el6.x86_64 conflicts with file from the package Mysql-libs-5.1.73-5.el6_6.x86_64file/ Usr/share/mysql/danish/errmsg.sys from install of mysql-community-common-5.7.16-1.el6.x86_64 conflicts with file from Package Mysql-libs-5.1.73-5.el6_6.x86_64file/usr/share/mysql/dutch/errmsg.sys from Install of mysql-community-common-5.7.16-1.el6.x86_64 conflicts with file from the package mysql-libs-5.1.73-5.el6_6.x86_64file/usr /share/mysql/english/errmsg.sys from install of mysql-community-common-5.7.16-1.el6.x86_64 conflicts with file from Package Mysql-libs-5.1.73-5.el6_6.x86_64file/usr/share/mysql/estonian/errmsg.sys from Install of mysql-community-common-5.7.16-1.el6.x86_64 conflicts with file from the package mysql-libs-5.1.73-5.el6_6.x86_64file/usr/share/mysql/french/errmsg.sys from install of mysql-community-common-5.7.16-1.el6.x86_64 conflicts With file from package Mysql-libs-5.1.73-5.el6_6.x86_64file/usr/share/mysql/german/errmsg.sys from install of mysql-community-common-5.7.16-1.el6.x86_64 conflicts with file from the package mysql-libs-5.1.73-5.el6_6.x86_64file/usr /share/mysql/greek/errmsg.sys from install of mysql-community-common-5.7.16-1.el6.x86_64 conflicts with file from Package Mysql-libs-5.1.73-5.el6_6.x86_64file/usr/share/mysql/hungarian/errmsg.sys from Install of mysql-community-common-5.7.16-1.el6.x86_64 conflicts with file from the package mysql-libs-5.1.73-5.el6_6.x86_64file/usr /share/mysql/italian/errmsg.sys from install of mysql-community-common-5.7.16-1.el6.x86_64 conflicts with file from Package Mysql-libs-5.1.73-5.el6_6.x86_64file/usr/share/mysql/japanese/errmsg.sys from Install of mysql-community-common-5.7.16-1.el6.x86_64 conflicts with file from the package Mysql-libs-5.1.73-5.el6_6.x86_64filE/usr/share/mysql/korean/errmsg.sys from install of mysql-community-common-5.7.16-1.el6.x86_64 conflicts with file From package Mysql-libs-5.1.73-5.el6_6.x86_64file/usr/share/mysql/norwegian-ny/errmsg.sys from install of mysql-community-common-5.7.16-1.el6.x86_64 conflicts with file from the package mysql-libs-5.1.73-5.el6_6.x86_64file/usr /share/mysql/norwegian/errmsg.sys from install of mysql-community-common-5.7.16-1.el6.x86_64 conflicts with file from Package Mysql-libs-5.1.73-5.el6_6.x86_64file/usr/share/mysql/polish/errmsg.sys from Install of mysql-community-common-5.7.16-1.el6.x86_64 conflicts with file from the package mysql-libs-5.1.73-5.el6_6.x86_64file/usr /share/mysql/portuguese/errmsg.sys from install of mysql-community-common-5.7.16-1.el6.x86_64 conflicts with file from Package Mysql-libs-5.1.73-5.el6_6.x86_64file/usr/share/mysql/romanian/errmsg.sys from Install of mysql-community-common-5.7.16-1.el6.x86_64 conflicts with file from the package Mysql-libs-5.1.73-5.el6_6.x86_64file /usr/share/mysql/russian/errmsg.sys from install of mysql-community-common-5.7.16-1.el6.x86_64 conflicts with file From package Mysql-libs-5.1.73-5.el6_6.x86_64file/usr/share/mysql/serbian/errmsg.sys from install of mysql-community-common-5.7.16-1.el6.x86_64 conflicts with file from the package mysql-libs-5.1.73-5.el6_6.x86_64file/usr /share/mysql/slovak/errmsg.sys from install of mysql-community-common-5.7.16-1.el6.x86_64 conflicts with file from Package Mysql-libs-5.1.73-5.el6_6.x86_64file/usr/share/mysql/spanish/errmsg.sys from Install of mysql-community-common-5.7.16-1.el6.x86_64 conflicts with file from the package mysql-libs-5.1.73-5.el6_6.x86_64file/usr /share/mysql/swedish/errmsg.sys from install of mysql-community-common-5.7.16-1.el6.x86_64 conflicts with file from Package Mysql-libs-5.1.73-5.el6_6.x86_64file/usr/share/mysql/ukrainian/errmsg.sys from Install of mysql-community-common-5.7.16-1.el6.x86_64 conflicts with file from the package mysql-libs-5.1.73-5.el6_6.x86_64file/usr /shaRe/mysql/charsets/index.xml from install of mysql-community-common-5.7.16-1.el6.x86_64 conflicts with file from package Mysql-libs-5.1.73-5.el6_6.x86_64file/usr/share/mysql/charsets/armscii8.xml from Install of mysql-community-common-5.7.16-1.el6.x86_64 conflicts with file from the package mysql-libs-5.1.73-5.el6_6.x86_64file/usr /share/mysql/charsets/ascii.xml from install of mysql-community-common-5.7.16-1.el6.x86_64 conflicts with file from Package Mysql-libs-5.1.73-5.el6_6.x86_64file/usr/share/mysql/charsets/cp1250.xml from Install of mysql-community-common-5.7.16-1.el6.x86_64 conflicts with file from the package mysql-libs-5.1.73-5.el6_6.x86_64file/usr /share/mysql/charsets/cp1256.xml from install of mysql-community-common-5.7.16-1.el6.x86_64 conflicts with file from Package Mysql-libs-5.1.73-5.el6_6.x86_64file/usr/share/mysql/charsets/cp1257.xml from Install of mysql-community-common-5.7.16-1.el6.x86_64 conflicts with file from the package mysql-libs-5.1.73-5.el6_6.x86_64file/usr /share/mYsql/charsets/cp850.xml from install of mysql-community-common-5.7.16-1.el6.x86_64 conflicts with file from package Mysql-libs-5.1.73-5.el6_6.x86_64file/usr/share/mysql/charsets/cp852.xml from Install of mysql-community-common-5.7.16-1.el6.x86_64 conflicts with file from the package mysql-libs-5.1.73-5.el6_6.x86_64file/usr /share/mysql/charsets/cp866.xml from install of mysql-community-common-5.7.16-1.el6.x86_64 conflicts with file from Package Mysql-libs-5.1.73-5.el6_6.x86_64file/usr/share/mysql/charsets/dec8.xml from Install of mysql-community-common-5.7.16-1.el6.x86_64 conflicts with file from the package mysql-libs-5.1.73-5.el6_6.x86_64file/usr /share/mysql/charsets/geostd8.xml from install of mysql-community-common-5.7.16-1.el6.x86_64 conflicts with file from Package Mysql-libs-5.1.73-5.el6_6.x86_64file/usr/share/mysql/charsets/greek.xml from Install of mysql-community-common-5.7.16-1.el6.x86_64 conflicts with file from the package mysql-libs-5.1.73-5.el6_6.x86_64file/usr /share/mysql/charSets/hebrew.xml from install of mysql-community-common-5.7.16-1.el6.x86_64 conflicts with file from package mysql-libs-5 .1.73-5.el6_6.x86_64file/usr/share/mysql/charsets/hp8.xml from install of mysql-community-common-5.7.16-1.el6.x86_ Conflicts with file from package Mysql-libs-5.1.73-5.el6_6.x86_64file/usr/share/mysql/charsets/keybcs2.xml from Install of mysql-community-common-5.7.16-1.el6.x86_64 conflicts with file from package mysql-libs-5.1.73-5.el6_6.x86_ 64file/usr/share/mysql/charsets/koi8r.xml from install of mysql-community-common-5.7.16-1.el6.x86_64 conflicts with File from package Mysql-libs-5.1.73-5.el6_6.x86_64file/usr/share/mysql/charsets/koi8u.xml from install of mysql-community-common-5.7.16-1.el6.x86_64 conflicts with file from the package mysql-libs-5.1.73-5.el6_6.x86_64file/usr /share/mysql/charsets/latin1.xml from install of mysql-community-common-5.7.16-1.el6.x86_64 conflicts with file from Package Mysql-libs-5.1.73-5.el6_6.x86_64file/usr/share/mysql/charsets/latIn2.xml from install of mysql-community-common-5.7.16-1.el6.x86_64 conflicts with file from package Mysql-libs-5.1.73-5.el6_6.x86_64file/usr/share/mysql/charsets/latin5.xml from Install of mysql-community-common-5.7.16-1.el6.x86_64 conflicts with file from the package mysql-libs-5.1.73-5.el6_6.x86_64file/usr /share/mysql/charsets/latin7.xml from install of mysql-community-common-5.7.16-1.el6.x86_64 conflicts with file from Package Mysql-libs-5.1.73-5.el6_6.x86_64file/usr/share/mysql/charsets/macce.xml from Install of mysql-community-common-5.7.16-1.el6.x86_64 conflicts with file from the package mysql-libs-5.1.73-5.el6_6.x86_64file/usr /share/mysql/charsets/macroman.xml from install of mysql-community-common-5.7.16-1.el6.x86_64 conflicts with file from Package Mysql-libs-5.1.73-5.el6_6.x86_64file/usr/share/mysql/charsets/swe7.xml from Install of mysql-community-common-5.7.16-1.el6.x86_64 conflicts with file from the package mysql-libs-5.1.73-5.el6_6.x86_64

OK, the first line is a little clue out, but the first step of installation is completed. 、

  

2, Rpm-ivh mysql-community-libs-*.rpm

This step, I met the hole, first look at the cause of the error.

Warning:mysql-community-libs-5.7.16-1.el6.x86_64.rpm:header V3 dsa/sha1 Signature, key ID 5072e1f5:nokeyerror:failed Dependencies:mysql-community-common (x86-64) >= 5.7.9 is needed by mysql-community-libs-5.7.16-1.el6.x86_64

The warning line said that the reason for the error is obvious: Because Yum installed the old version of the GPG keys caused by

There are also reasons for file dependencies. (both are the same version so it's OK to make a version, only the former)

Solution: Add--force--nodeps the command to see the success log.

                Preparing ... ########################################### [100%]   1:mysql-community-libs   ############################# ############## [50%]   2:mysql-community-libs-co########################################### [100%]You has mail In/var/spool/mail/root

3, Rpm-ivh mysql-community-client-5.7.16-1.el6.x86_64.rpm

                Preparing ... ########################################### [100%]   1:mysql-community-client ################################ ########### [100%][[email protected] mysql]# RPM-IVH mysql-community-server-5.7.16-1.el6.x86_64.rpm Warning: Mysql-community-server-5.7.16-1.el6.x86_64.rpm:header V3 dsa/sha1 Signature, key ID 5072e1f5:nokeyerror:failed Dependencies:mysql-community-common (x86-64) = 5.7.16-1.el6 is needed by mysql-community-server-5.7.16-1.el6.x86_64

4, RPM-IVH mysql-community-server-5.7.16-1.el6.x86_64.rpm (This step, also took place the reason for the second step, plus--force--nodeps can, specific reasons for the specific treatment of error)

                Preparing ... ########################################### [100%]   1:mysql-community-server ^[^a######                                      (15############## ############################# [100%]

OK, to this step, complete Linux under the installation of MySQL (RPM mode).

To start the MySQL service:

Service mysqld Start

To query the random initial root password:

Cat/var/log/mysqld.log | grep "Temporary password"

Log in to:

Mysql-uroot-p

Welcome to the MySQL Monitor.  

Environmental pits, installation pits, bags of pits, all kinds of pits, stepping on is to learn.

  

  

  

  

  

Build MySQL in a Linux environment

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.