Support Questions

Find answers, ask questions, and share your expertise

How To create the Mysql Local Repository for Installation

Expert Contributor
 
2 REPLIES 2

You can download mysql rpm and then use yum for install.

https://www.linode.com/docs/databases/mysql/how-to-install-mysql-on-centos-7

Expert Contributor
Created as below MySql Repository
1) Download the repository of Mysql server as below location, you should have the internet 
connection network or host, download according to you Linux version mine 6.8.
https://dev.mysql.com/downloads/repo/yum/
Red Hat 6.8 Linux as below 
https://dev.mysql.com/downloads/file/?id=465605

Download the yum package :-

Red Hat 6.8 Linux as below

https://dev.mysql.com/downloads/file/?id=465605

2) Install the YUM package 
[root@ ~]# yum install mysql57-community-release-el6-9.noarch.rpm
Loaded plugins: fastestmirror
Setting up Install Process
Examining mysql57-community-release-el6-9.noarch.rpm: mysql57-community-release-el6-9.noarch
Marking mysql57-community-release-el6-9.noarch.rpm to be installed
Repository HDP-UTILS-1.1.0.19 is listed more than once in the configuration
Loading mirror speeds from cached hostfile
Resolving Dependencies
--> Running transaction check
---> Package mysql57-community-release.noarch 0:el6-9 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

=========================================================================================================================================
 Package                               Arch               Version              Repository                                           Size
=========================================================================================================================================
Installing:
 mysql57-community-release             noarch             el6-9                /mysql57-community-release-el6-9.noarch             8.6 k

Transaction Summary
=========================================================================================================================================
Install       1 Package(s)

Total size: 8.6 k
Installed size: 8.6 k
Is this ok [y/N]: y
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Warning: RPMDB altered outside of yum.
  Installing : mysql57-community-release-el6-9.noarch                                                                                1/1
  Verifying  : mysql57-community-release-el6-9.noarch                                                                                1/1

Installed:
  mysql57-community-release.noarch 0:el6-9

Complete!
[root@ ~]#

3) Delete the other version which not required repository files from /etc/yum.repos.d/mysql-community.repo
4) # vi /etc/yum.repos.d/mysql-community.repo
# Enable to use MySQL 5.6
[mysql56-community]
name=MySQL 5.6 Community Server
baseurl=http://repo.mysql.com/yum/mysql-5.6-community/el/6/$basearch/
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql


#yum repolist |grep MYSQL ( It should list the MySql Repository )