Visit Counter

Thursday, April 8, 2021

MYSQL 8.0 Installation on Linux

 

Download MYSQL 8 for Linux 

https://downloads.mysql.com/archives/community/

Red Hat Enterprise Linux 7 / Oracle Linux 7 (x86, 64-bit), RPM Bundl

Remove MariaDB

[root@rac02 ~]# yum remove mariadb-libs

Loaded plugins: langpacks

Resolving Dependencies

--> Running transaction check

---> Package mariadb-libs.x86_64 1:5.5.35-3.el7 will be erased

--> Processing Dependency: libmysqlclient.so.18()(64bit) for package: perl-DBD-MySQL-4.023-5.el7.x86_64

--> Processing Dependency: libmysqlclient.so.18()(64bit) for package: 1:qt-mysql-4.8.5-8.el7.x86_64

--> Processing Dependency: libmysqlclient.so.18()(64bit) for package: 2:postfix-2.10.1-6.el7.x86_64

--> Processing Dependency: libmysqlclient.so.18(libmysqlclient_16)(64bit) for package: perl-DBD-MySQL-4.023-5.el7.x86_64

--> Processing Dependency: libmysqlclient.so.18(libmysqlclient_16)(64bit) for package: 1:qt-mysql-4.8.5-8.el7.x86_64

--> Processing Dependency: libmysqlclient.so.18(libmysqlclient_16)(64bit) for package: 2:postfix-2.10.1-6.el7.x86_64

--> Processing Dependency: mariadb-libs(x86-64) = 1:5.5.35-3.el7 for package: 1:mariadb-server-5.5.35-3.el7.x86_64

--> Processing Dependency: mariadb-libs(x86-64) = 1:5.5.35-3.el7 for package: 1:mariadb-5.5.35-3.el7.x86_64

--> Running transaction check

---> Package mariadb.x86_64 1:5.5.35-3.el7 will be erased

---> Package mariadb-server.x86_64 1:5.5.35-3.el7 will be erased

--> Processing Dependency: mariadb-server for package: akonadi-mysql-1.9.2-4.el7.x86_64

---> Package perl-DBD-MySQL.x86_64 0:4.023-5.el7 will be erased

---> Package postfix.x86_64 2:2.10.1-6.el7 will be erased

---> Package qt-mysql.x86_64 1:4.8.5-8.el7 will be erased

--> Running transaction check

---> Package akonadi-mysql.x86_64 0:1.9.2-4.el7 will be erased

--> Finished Dependency Resolution

ol7_UEKR3/x86_64                                         | 2.5 kB     00:00     

ol7_UEKR3/x86_64/updateinfo                              | 121 kB     00:00     

ol7_UEKR3/x86_64/primary_db                              |  57 MB     00:05     

ol7_latest/x86_64                                        | 2.7 kB     00:00     

ol7_latest/x86_64/group                                  | 660 kB     00:00     

ol7_latest/x86_64/updateinfo                             | 3.2 MB     00:00     

ol7_latest/x86_64/primary_db                             |  35 MB     00:03     


Dependencies Resolved


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

 Package             Arch        Version               Repository          Size

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

Removing:

 mariadb-libs        x86_64      1:5.5.35-3.el7        @anaconda/7.0      4.4 M

Removing for dependencies:

 akonadi-mysql       x86_64      1.9.2-4.el7           @anaconda/7.0      9.6 k

 mariadb             x86_64      1:5.5.35-3.el7        @anaconda/7.0       49 M

 mariadb-server      x86_64      1:5.5.35-3.el7        @anaconda/7.0       55 M

 perl-DBD-MySQL      x86_64      4.023-5.el7           @anaconda/7.0      323 k

 postfix             x86_64      2:2.10.1-6.el7        @anaconda/7.0       12 M

 qt-mysql            x86_64      1:4.8.5-8.el7         @anaconda/7.0       74 k


Transaction Summary

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

Remove  1 Package (+6 Dependent packages)


Installed size: 121 M

Is this ok [y/N]: y

Downloading packages:

Running transaction check

Running transaction test

Transaction test succeeded

Running transaction

Warning: RPMDB altered outside of yum.

  Erasing    : akonadi-mysql-1.9.2-4.el7.x86_64                             1/7 

  Erasing    : 1:mariadb-server-5.5.35-3.el7.x86_64                         2/7 

  Erasing    : 1:mariadb-5.5.35-3.el7.x86_64                                3/7 

  Erasing    : perl-DBD-MySQL-4.023-5.el7.x86_64                            4/7 

  Erasing    : 1:qt-mysql-4.8.5-8.el7.x86_64                                5/7 

  Erasing    : 2:postfix-2.10.1-6.el7.x86_64                                6/7 

  Erasing    : 1:mariadb-libs-5.5.35-3.el7.x86_64                           7/7 

  Verifying  : 2:postfix-2.10.1-6.el7.x86_64                                1/7 

  Verifying  : 1:qt-mysql-4.8.5-8.el7.x86_64                                2/7 

  Verifying  : akonadi-mysql-1.9.2-4.el7.x86_64                             3/7 

  Verifying  : 1:mariadb-libs-5.5.35-3.el7.x86_64                           4/7 

  Verifying  : 1:mariadb-server-5.5.35-3.el7.x86_64                         5/7 

  Verifying  : perl-DBD-MySQL-4.023-5.el7.x86_64                            6/7 

  Verifying  : 1:mariadb-5.5.35-3.el7.x86_64                                7/7 


Removed:

  mariadb-libs.x86_64 1:5.5.35-3.el7                                            


Dependency Removed:

  akonadi-mysql.x86_64 0:1.9.2-4.el7      mariadb.x86_64 1:5.5.35-3.el7         

  mariadb-server.x86_64 1:5.5.35-3.el7    perl-DBD-MySQL.x86_64 0:4.023-5.el7   

  postfix.x86_64 2:2.10.1-6.el7           qt-mysql.x86_64 1:4.8.5-8.el7         


Complete!

[root@rac02 ~]# 


[root@rac02 /]# ls

1     commands.sql  etc   lib64  mysqlsoft  proc  sbin  tmp  usr

bin   dev           home  media  ocfs2      root  srv   u01  var

boot  dlm           lib   mnt    opt        run   sys   u02

[root@rac02 /]# cd mysqlsoft/

Untar Bunbl file

[root@rac02 mysqlsoft]# tar -cvf Bundl

mysql-community-client-8.0.0-0.1.dmr.el7.x86_64.rpm

mysql-community-common-8.0.0-0.1.dmr.el7.x86_64.rpm

mysql-community-devel-8.0.0-0.1.dmr.el7.x86_64.rpm

mysql-community-embedded-8.0.0-0.1.dmr.el7.x86_64.rpm

mysql-community-embedded-compat-8.0.0-0.1.dmr.el7.x86_64.rpm

mysql-community-embedded-devel-8.0.0-0.1.dmr.el7.x86_64.rpm

mysql-community-libs-8.0.0-0.1.dmr.el7.x86_64.rpm

mysql-community-libs-compat-8.0.0-0.1.dmr.el7.x86_64.rpm

mysql-community-minimal-debuginfo-8.0.0-0.1.dmr.el7.x86_64.rpm

mysql-community-server-8.0.0-0.1.dmr.el7.x86_64.rpm

mysql-community-server-minimal-8.0.0-0.1.dmr.el7.x86_64.rpm

mysql-community-test-8.0.0-0.1.dmr.el7.x86_64.rpm


Follow steps

[root@rac02 mysqlsoft]# rpm -ivh mysql-community-common-8.0.0-0.1.dmr.el7.x86_64.rpm 

warning: mysql-community-common-8.0.0-0.1.dmr.el7.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY

Preparing...                          ################################# [100%]

Updating / installing...

   1:mysql-community-common-8.0.0-0.1.################################# [100%]

[root@rac02 mysqlsoft]# 


[root@rac02 mysqlsoft]# rpm -ivh mysql-community-libs-8.0.0-0.1.dmr.el7.x86_64.rpm 

warning: mysql-community-libs-8.0.0-0.1.dmr.el7.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY

Preparing...                          ################################# [100%]

Updating / installing...

   1:mysql-community-libs-8.0.0-0.1.dm################################# [100%]



[root@rac02 mysqlsoft]# rpm -ivh mysql-community-client-8.0.0-0.1.dmr.el7.x86_64.rpm 

warning: mysql-community-client-8.0.0-0.1.dmr.el7.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY

Preparing...                          ################################# [100%]

Updating / installing...

   1:mysql-community-client-8.0.0-0.1.################################# [100%]



[root@rac02 mysqlsoft]# 

[root@rac02 mysqlsoft]# rpm -ivh mysql-community-libs-compat-8.0.0-0.1.dmr.el7.x86_64.rpm 

warning: mysql-community-libs-compat-8.0.0-0.1.dmr.el7.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY

Preparing...                          ################################# [100%]

Updating / installing...

   1:mysql-community-libs-compat-8.0.0################################# [100%]

[root@rac02 mysqlsoft]# 




[root@rac02 mysqlsoft]# rpm -ivh mysql-community-server-8.0.0-0.1.dmr.el7.x86_64.rpm 

warning: mysql-community-server-8.0.0-0.1.dmr.el7.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY

Preparing...                          ################################# [100%]

Updating / installing...

   1:mysql-community-server-8.0.0-0.1.################################# [100%]

[root@rac02 mysqlsoft]# 


Start MYSQL Services


[root@rac02 mysqlsoft]# systemctl start mysqld.service 

[root@rac02 mysqlsoft]# 


Check MYSQL Service

[root@rac02 mysqlsoft]# 

[root@rac02 mysqlsoft]# systemctl status mysqld.service 

mysqld.service - MySQL Server

   Loaded: loaded (/usr/lib/systemd/system/mysqld.service; enabled)

   Active: active (running) since Thu 2021-04-08 15:37:30 GST; 3min 22s ago

  Process: 5280 ExecStart=/usr/sbin/mysqld --daemonize --pid-file=/var/run/mysqld/mysqld.pid $MYSQLD_OPTS (code=exited, status=0/SUCCESS)

  Process: 4944 ExecStartPre=/usr/bin/mysqld_pre_systemd (code=exited, status=0/SUCCESS)

 Main PID: 5283 (mysqld)

   CGroup: /system.slice/mysqld.service

           â””─5283 /usr/sbin/mysqld --daemonize --pid-file=/var/run/mysqld/mysql...


Apr 08 15:37:30 rac02.localdomain systemd[1]: Started MySQL Server.

[root@rac02 mysqlsoft]# cat /var/log/mysqld.log | grep password 

2021-04-08T11:37:21.573873Z 4 [Note] A temporary password is generated for root@localhost: &f5kdp6qo2+O

Temporary Password

[root@rac02 mysqlsoft]# mysql -uroot

ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)

[root@rac02 mysqlsoft]# mysql -uroot -p

Enter password: 

Welcome to the MySQL monitor.  Commands end with ; or \g.

Your MySQL connection id is 5

Server version: 8.0.0-dmr


Copyright (c) 2000, 2016, 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> show databases;

ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement.

mysql> 


mysql> alter user 'root'@'localhost' identified by 'Ridge@123';

Query OK, 0 rows affected (0.00 sec)


mysql> show databases;

+--------------------+

| Database           |

+--------------------+

| information_schema |

| mysql              |

| performance_schema |

| sys                |

+--------------------+

4 rows in set (0.01 sec)


mysql> exit

Bye

[root@rac02 mysqlsoft]# cat /etc/my.cnf

# For advice on how to change settings please see

# http://dev.mysql.com/doc/refman/5.7/en/server-configuration-defaults.html


[mysqld]

#

# Remove leading # and set to the amount of RAM for the most important data

# cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%.

# innodb_buffer_pool_size = 128M

#

# Remove leading # to turn on a very important data integrity option: logging

# changes to the binary log between backups.

# log_bin

#

# Remove leading # to set options mainly useful for reporting servers.

# The server defaults are faster for transactions and fast SELECTs.

# Adjust sizes as needed, experiment to find the optimal values.

# join_buffer_size = 128M

# sort_buffer_size = 2M

# read_rnd_buffer_size = 2M

datadir=/var/lib/mysql            -----Datadirectory     

socket=/var/lib/mysql/mysql.sock  


# Disabling symbolic-links is recommended to prevent assorted security risks

symbolic-links=0


log-error=/var/log/mysqld.log          ---Log file

pid-file=/var/run/mysqld/mysqld.pid    ---Process File

[root@rac02 mysqlsoft]# 


No comments:

Post a Comment