Rhel, CentOS, fedora install MySQL community server with Yum

Source: Internet
Author: User
Tags gpg mysql version yum repolist

  1. Download the appropriate version of the upgrade package for the Redhat series in the MySQL official link:

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


  2. Redhat root User execution: Rpm-uvh mysql-community-release-el****.noarch.rpm


  3. To view the MySQL version that supports the upgrade installation:

    [email protected] ~]# Yum repolist all | grep MySQL

    Mysql-connectors-community MySQL Connectors Community Enabled:5

    Mysql-connectors-community-source MySQL Connectors Community-so Disabled

    Mysql56-community MySQL 5.6 Community Server enabled:94

    Mysql56-community-source MySQL 5.6 Community server-so Disabled

    MYSQL57-COMMUNITY-DMR MySQL 5.7 Community Server deve disabled

    Mysql57-community-dmr-source MySQL 5.7 Community Server deve disabled


  4. [email protected] ~]# Yum install Mysql-community-server

    ......

    Dependencies resolved

    ==================================================================================

    Package Arch Version Repository Size

    ==================================================================================

    Installing:

    Mysql-community-server i386 5.6.24-3.el5 mysql56-community M

    Installing for dependencies:

    MySQL i386 5.6.24-3.el5 mysql56-community k

    Mysql-community-client i386 5.6.24-3.el5 mysql56-community M

    Mysql-community-common i386 5.6.24-3.el5 mysql56-community 692 k

    Mysql-community-libs i386 5.6.24-3.el5 mysql56-community 2.3 M

    Mysql-community-libs-compat i386 5.6.24-3.el5 mysql56-community 2.0 M

    PERL-DBI i386 1.52-2.el5 Base K


    Transaction Summary

    ==================================================================================

    Install 7 Package (s)

    Upgrade 0 Package (s)


    Total Download size:111 M

    Is this OK [y/n]: Y

    Downloading Packages:

    (1/7): mysql-5.6.24-3.el5.i386.rpm | KB 00:02

    (2/7): perl-dbi-1.52-2.el5.i386.rpm | KB 00:11

    (3/7): mysql-community-common-5.6.24-3.el5.i386.rpm | 692 KB 00:17

    (4/7): mysql-community-libs-compat-5.6.24-3.el5.i386.rpm | 2.0 MB 00:51

    (5/7): mysql-community-libs-5.6.24-3.el5.i386.rpm | 2.3 MB 01:12

    (6/7): mysql-community-client-5.6.24-3.el5.i386.rpm | MB 06:58

    (7/7): mysql-community-server-5.6.24-3.el5.i386.rpm | MB 13:29

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

    Total KB/S | 111 MB 23:07

    Warning:rpmts_HdrFromFdno:V3 DSA Signature:nokey, key ID 5072e1f5

    Mysql56-community/gpgkey | 2.1 KB 00:00

    Importing GPG key 0x5072e1f5 "MySQL Release Engineering <[email protected]>" from file:/etc/pki/rpm-gpg/ Rpm-gpg-key-mysql

    Is this OK [y/n]: Y

    Warning:rpmts_HdrFromFdno:Header V3 DSA Signature:nokey, key ID e8562897

    Base/gpgkey | 1.5 KB 00:00

    Importing GPG key 0xe8562897 "CentOS-5 key (CentOS 5 official Signing key) <[email protected]>" FROM/ETC/PKI/RPM-GP G/rpm-gpg-key-centos-5

    Is this OK [y/n]: Y

    Running Rpm_check_debug

    Running Transaction Test

    Finished Transaction Test

    Transaction Test Succeeded

    Running Transaction

    INSTALLING:PERL-DBI 1/7

    Installing:mysql-community-libs 2/7

    Installing:mysql-community-common 3/7

    Installing:mysql-community-client 4/7

    Installing:mysql-community-libs-compat 5/7

    Installing:mysql-community-server 6/7

    Warning:user MySQL does not exist-using root

    Warning:user MySQL does not exist-using root

    Installing:mysql 7/7


    Installed:

    Mysql-community-server.i386 0:5.6.24-3.el5

    Dependency installed:

    Mysql.i386 0:5.6.24-3.el5

    Mysql-community-client.i386 0:5.6.24-3.el5

    Mysql-community-common.i386 0:5.6.24-3.el5

    Mysql-community-libs.i386 0:5.6.24-3.el5

    Mysql-community-libs-compat.i386 0:5.6.24-3.el5

    Perl-dbi.i386 0:1.52-2.el5


    complete!


  5. To add a MySQL user:

    useradd-g MySQL MySQL


  6. Key Directory Change Master permission

    Chown-r Mysql:mysql/var/run/mysqld

    Chown-r Mysql:mysql/var/lib/mysql


  7. Creating the underlying user table

    mysql_install_db--user=mysql--ldata=/var/lib/mysql


  8. To start and stop MySQL server:

    Service Mysqld Start/status/stop

Rhel, CentOS, fedora install MySQL community server with Yum

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.