Upgrade in MySQL generally refers to updating the MySQL
Cluster (Server) to a newer version, either a minor or major release, to
benefit from bug fixes, new features, and performance enhancements. It also
involves using the mysql_upgrade script to ensure your database schemas
are compatible with the updated server.
In MySQL, the first two numbers of the version number represent the
major version, while the last number indicates the minor version. A major
version bump usually signifies incompatible changes or a new major feature set,
while a minor version update typically introduces new features or bug fixes
while maintaining backward compatibility.
Implementation Diagram:
Infrastructure Diagram:
In this QuickStart, we learn how
to:
- Download
and configure MySQL 8.0 repos
- Install
MySQL 8.0
- Check
and configure the root password
- Connect
the MySQL cluster
- Validation
Step-01 Download and configure MySQL 8.0
repos
-
Download
the MySQL SE repository from the below URL
https://dev.mysql.com/downloads/repo/yum/
- Configure the MySQL repository
[root@mysql-se ~]# rpm --import https://repo.mysql.com/RPM-GPG-KEY-mysql-2023
[root@mysql-se ~]# cd /etc/yum.repos.d/
[root@mysql-se yum.repos.d]# ls -ltr mysql-community.repo
-rw-r--r--. 1 root root 2755 Apr 22 2024 mysql-community.repo
[root@mysql-se yum.repos.d]# sed -i
's/enabled=1/enabled=0/' mysql-community.repo
[root@mysql-se yum.repos.d]#
[root@mysql-se ~]# sed -i 's/enabled=1/enabled=0/'
mysql-community.repo
Step-02: Install MySQL 8.0
[root@mysql-se
yum.repos.d]# dnf
--enablerepo=mysql80-community
list available | grep
mysql-community-server
Step-03 Check and configure the root password
-
First,
enable the MySQL user login
[root@mysql-se yum.repos.d]# cat /etc/passwd | grep -i
mysql
mysql:x:27:27:MySQL Server:/var/lib/mysql:/bin/false
to
mysql:x:27:27:MySQL Server:/var/lib/mysql:/bin/Bash
-
Start
the MySQL Daemon Service using the systemctl command
[root@mysql-se
~]# systemctl status mysqld
[root@mysql-se
~]# systemctl start mysqld
[root@mysql-se
~]# systemctl status mysqld
-
Check
the MySQL version
[root@mysql-se
~]# mysql –version
-
Get
the MySQL root password from MySQL service log
[root@mysql-se
~]# cat /var/log/mysqld.log | grep -i ‘temporary password’
-
Login
to MySQL user and configure the secure password using mysql_secure_installation
utility
[root@mysql-se ~]# sudo su - mysql
[mysql@mysql-se ~]$ cd /usr/bin/
[mysql@mysql-se bin]$ ls -ltr mysql_secure_*
-rwxr-xr-x. 1 root root 7387792 Mar 31 06:25
mysql_secure_installation
[mysql@mysql-se bin]$
Step-04 Connect to MySQL cluster
Step-5 Validate the MySQL Cluster
mysql>
show databases;
No comments:
Post a Comment