Mysql 5.6 RPM Installation On Linux 6

Step By Step Installation Of MySql 5.6 On Oracle Redhat Linux 6.10 

Step By Step Mysql 5.6 Installation On Oracle Linux 6

Hello Friends,

There were many post you can find about installation of mysql on Linux server. there is a many way to install mysql on linux like using RPM Package, using Generic file, using tar.gz file.

Here i am going to show you how to install mysql 5.6 on oracle Linux 6 using mysql RPM package with default location, in upcoming post i will show you how to install mysql rpm with different location.

1. Check your OS Version:

[root@ctpprod1 mysql]# uname -a
Linux ctpprod1 3.8.13-118.46.1.el6uek.x86_64 #2 SMP Tue Jun 2 09:58:36 PDT 2020 x86_64 x86_64 x86_64 GNU/Linux


[root@ctpprod1 mysql]# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 6.10 (Santiago)
[root@ctpprod1 mysql]#


2. Download RPM package from MySQL official site. Click Here download RPM Package

3. Extract the tar file using tar -xvf command. 

[root@prod1 MYSQLRPMSOFT]# tar -xvf MySQL-5.6.48-1.el6.x86_64.rpm-bundle.tar
MySQL-devel-5.6.48-1.el6.x86_64.rpm
MySQL-client-5.6.48-1.el6.x86_64.rpm
MySQL-embedded-5.6.48-1.el6.x86_64.rpm
MySQL-server-5.6.48-1.el6.x86_64.rpm
MySQL-shared-compat-5.6.48-1.el6.x86_64.rpm
MySQL-shared-5.6.48-1.el6.x86_64.rpm
MySQL-test-5.6.48-1.el6.x86_64.rpm
[root@ctpprod1 MYSQLRPMSOFT]#

4. After extracting you will find below list of RPM Packages.

[root@ctpprod1 MYSQLRPMSOFT]# ls -lhrt
total 459M
-rw-r--r-- 1 7155 31415  21M Mar 11 16:39 MySQL-client-5.6.48-1.el6.x86_64.rpm
-rw-r--r-- 1 7155 31415 3.4M Mar 11 16:39 MySQL-devel-5.6.48-1.el6.x86_64.rpm
-rw-r--r-- 1 7155 31415  87M Mar 11 16:39 MySQL-embedded-5.6.48-1.el6.x86_64.rpm
-rw-r--r-- 1 7155 31415  63M Mar 11 16:39 MySQL-server-5.6.48-1.el6.x86_64.rpm
-rw-r--r-- 1 7155 31415 2.3M Mar 11 16:39 MySQL-shared-5.6.48-1.el6.x86_64.rpm
-rw-r--r-- 1 7155 31415  51M Mar 11 16:39 MySQL-test-5.6.48-1.el6.x86_64.rpm
-rw-r--r-- 1 7155 31415 3.8M Mar 12 12:54 MySQL-shared-compat-5.6.48-1.el6.x86_64.rpm
-rwxrwxr-x 1 root root  230M Jul 11 11:53 MySQL-5.6.48-1.el6.x86_64.rpm-bundle.tar


5. Then install client and shared rpm using rpm -Uvh command or you can use below command if you are connected with interntet.

[root@ctpprod1 MYSQLRPMSOFT]# yum install MySQL-client-5.6.48-1.el6.x86_64.rpm

[root@ctpprod1 MYSQLRPMSOFT]# yum install MySQL-shared-5.6.48-1.el6.x86_64.rpm

6. 
[root@ctpprod1 MYSQLRPMSOFT]# yum install MySQL-server-5.6.48-1.el6.x86_64.rpm
Loaded plugins: refresh-packagekit, security, ulninfo
Setting up Install Process
Examining MySQL-server-5.6.48-1.el6.x86_64.rpm: MySQL-server-5.6.48-1.el6.x86_64

Check download and check below screenshot.



7. A RANDOM PASSWORD HAS BEEN SET FOR THE MySQL root USER ! You will find that password in '/root/.mysql_secret'.

[root@ctpprod1 MYSQLRPMSOFT]# cat /root/.mysql_secret
# The random password set for the root user at Sat Jul 11 16:36:54 2020 (local time): qzrfea577H1Tk96y

You must change that password on your first connect, no other statement but 'SET PASSWORD' will be accepted. See the manual for the semantics of the 'password expired' flag.

8.  In addition, you can run:

  /usr/bin/mysql_secure_installation

[root@ctpprod1 MYSQLRPMSOFT]# /usr/bin/mysql_secure_installation

It will ask you to enter existing root user password and change it, after that it will ask some below points.

Re-enter new password:
Password updated successfully!
Reloading privilege tables..
 ... Success!
Remove anonymous users? [Y/n] Y
 ... Success!
Remove test database and access to it? [Y/n] n
 ... skipping.
Reload privilege tables now? [Y/n] Y
 ... Success!


All done!  If you've completed all of the above steps, your MySQL installation should now be secure.

9. Now you can start mysql service and  connect with your database using new root user password.

[root@ctpprod1 MYSQLRPMSOFT]# service mysql start
Starting MySQL. SUCCESS!
[root@ctpprod1 MYSQLRPMSOFT]#


[root@ctpprod1 MYSQLRPMSOFT]# mysql -uroot -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 11
Server version: 5.6.48 MySQL Community Server (GPL)

Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql>

Don't forget to share your view on this post


SHARE

pavan

  • Image
  • Image
  • Image
  • Image
  • Image
    Blogger Comment
    Facebook Comment

0 Comments:

Post a Comment

Subscribe Us