The experiences, Test cases, views, and opinions etc expressed in this website are my own and does not reflect the views or opinions of my employer. This site is independent of and does not represent Oracle Corporation in any way. Oracle does not officially sponsor, approve, or endorse this site or its content.Product and company names mentioned in this website may be the trademarks of their respective owners.
Oracle Database Express Edition (XE) is a community supported edition of the Oracle Database family. It can be Installed in Linux, Windows, Dockers, and Virtual Machine as well.
Oracle Database Express Edition does not restrict in which environment it can be deployed. However, Oracle Database Express Edition is not supported and does not receive any patches, including security patches.
Oracle Database XE supports up to:
2 CPUs for foreground processes
2GB of RAM (SGA and PGA combined)
12GB of user data on disk (irrespective of compression factor)
wget https://download.oracle.com/otn-pub/otn_software/db-express/oracle-database-xe-21c-1.0-1.ol8.x86_64.rpm
--2022-12-22 06:35:24-- https://download.oracle.com/otn-pub/otn_software/db-express/oracle-database-xe-21c-1.0-1.ol8.x86_64.rpm
Resolving download.oracle.com (download.oracle.com)... 23.216.84.89
Connecting to download.oracle.com (download.oracle.com)|23.216.84.89|:443... connected.
HTTP request sent, awaiting response... 302 Moved Temporarily
Location: https://edelivery.oracle.com/otn-pub/otn_software/db-express/oracle-database-xe-21c-1.0-1.ol8.x86_64.rpm [following]
--2022-12-22 06:35:24-- https://edelivery.oracle.com/otn-pub/otn_software/db-express/oracle-database-xe-21c-1.0-1.ol8.x86_64.rpm
Resolving edelivery.oracle.com (edelivery.oracle.com)... 23.218.130.184, 2600:1408:9000:690::366, 2600:1408:9000:684::366
Connecting to edelivery.oracle.com (edelivery.oracle.com)|23.218.130.184|:443... connected.
HTTP request sent, awaiting response... 302 Moved Temporarily
Location: https://download.oracle.com/otn-pub/otn_software/db-express/oracle-database-xe-21c-1.0-1.ol8.x86_64.rpm?AuthParam=1671709045_2ea5c9ceb6bfd5f59e6722739e5109ef [following]
--2022-12-22 06:35:25-- https://download.oracle.com/otn-pub/otn_software/db-express/oracle-database-xe-21c-1.0-1.ol8.x86_64.rpm?AuthParam=1671709045_2ea5c9ceb6bfd5f59e6722739e5109ef
Connecting to download.oracle.com (download.oracle.com)|23.216.84.89|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 2339651768 (2.2G) [application/x-redhat-package-manager]
Saving to: ‘oracle-database-xe-21c-1.0-1.ol8.x86_64.rpm’
oracle-database-xe-21c-1.0-1.ol8.x86_64.rpm 54%[=========================================================================> ] 1.18G 2.14MB/s eta 2m 41s
oracle-database-xe-21c-1.0-1.ol8.x86_64.rpm 67%[===========================================================================================> ] 1.47G 2.80MB/s eta 2m 27s
oracle-database-xe-21c-1.0-1.ol8.x86_64.rpm 80%[=============================================================================================================> ] 1.76G 2.85MB/s eta 98s
oracle-database-xe-21c-1.0-1.ol8.x86_64.rpm 80%[=============================================================================================================> ] 1.76G 2.76MB/s eta 98s
oracle-database-xe-21c-1.0-1.ol8.x86_64.rpm 100%[========================================================================================================================================>] 2.18G 6.60MB/s in 8m 57s
2022-12-22 06:44:22 (4.16 MB/s) - ‘oracle-database-xe-21c-1.0-1.ol8.x86_64.rpm’ saved [2339651768/2339651768]
Downloading PreInstall RPM
curl -o oracle-database-preinstall-21c-1.0-1.el8.x86_64.rpm https://yum.oracle.com/repo/OracleLinux/OL8/appstream/x86_64/getPackage/oracle-database-preinstall-21c-1.0-1.el8.x86_64.rpm
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 30772 100 30772 0 0 132k 0 --:--:-- --:--:-- --:--:-- 132k
dnf -y localinstall oracle-database-xe-21c-1.0-1.ol8.x86_64.rpm
Last metadata expiration check: 3:43:34 ago on Thu 22 Dec 2022 03:25:41 AM EST.
Dependencies resolved.
=============================================================================================================================================================================================================================================
Package Architecture Version Repository Size
=============================================================================================================================================================================================================================================
Installing:
oracle-database-xe-21c x86_64 1.0-1 @commandline 2.2 G
Transaction Summary
=============================================================================================================================================================================================================================================
Install 1 Package
Total size: 2.2 G
Installed size: 5.8 G
Downloading Packages:
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
Preparing : 1/1
Running scriptlet: oracle-database-xe-21c-1.0-1.x86_64 1/1
Installing : oracle-database-xe-21c-1.0-1.x86_64 1/1
Running scriptlet: oracle-database-xe-21c-1.0-1.x86_64 1/1
[INFO] Executing post installation scripts...
[INFO] Oracle home installed successfully and ready to be configured.
To configure Oracle Database XE, optionally modify the parameters in '/etc/sysconfig/oracle-xe-21c.conf' and then execute '/etc/init.d/oracle-xe-21c configure' as root.
Verifying : oracle-database-xe-21c-1.0-1.x86_64 1/1
Installed:
oracle-database-xe-21c-1.0-1.x86_64
Complete!
This Completes the Required RPM and Database Installation
Configuring the Database
# /etc/init.d/oracle-xe-21c configure
Oracle Net Listener configured.
Specify a password to be used for database accounts. Oracle recommends that the password entered should be at least 8 characters in length, contain at least 1 uppercase character, 1 lower case character and 1 digit [0-9]. Note that the same password will be used for SYS, SYSTEM and PDBADMIN accounts:
Confirm the password:
Configuring Oracle Listener.
Listener configuration succeeded.
Configuring Oracle Database XE.
Enter SYS user password:
************
Enter SYSTEM user password:
**************
Enter PDBADMIN User Password:
**************
[WARNING] [INS-08109] Unexpected error occurred while validating inputs at state 'DBCreationOptions'.
CAUSE: No additional information available.
ACTION: Contact Oracle Support Services or refer to the software manual.
SUMMARY:
- java.lang.NullPointerException
Database configuration failed. Check logs under '/opt/oracle/cfgtoollogs/dbca'.
Set the CV_ASSUME_DISTID variable as its coming as NULL, to proceed further.
export CV_ASSUME_DISTID=OEL8.4
# /etc/init.d/oracle-xe-21c configure
Oracle Net Listener configured.
Specify a password to be used for database accounts. Oracle recommends that the password entered should be at least 8 characters in length, contain at least 1 uppercase character, 1 lower case character and 1 digit [0-9]. Note that the same password will be used for SYS, SYSTEM and PDBADMIN accounts:
Confirm the password:
Configuring Oracle Listener.
Listener configuration succeeded.
Configuring Oracle Database XE.
Enter SYS user password:
*************
Enter SYSTEM user password:
*************
Enter PDBADMIN User Password:
************
Prepare for db operation
7% complete
Copying database files
29% complete
Creating and starting Oracle instance
30% complete
33% complete
37% complete
40% complete
43% complete
Completing Database Creation
47% complete
50% complete
Creating Pluggable Databases
54% complete
71% complete
Executing Post Configuration Actions
93% complete
Running Custom Scripts
100% complete
Database creation complete. For details check the logfiles at:
/opt/oracle/cfgtoollogs/dbca/XE.
Database Information:
Global Database Name:XE
System Identifier(SID):XE
Look at the log file "/opt/oracle/cfgtoollogs/dbca/XE/XE.log" for further details.
Connect to Oracle Database using one of the connect strings:
Pluggable database: masked_FQDN:1523/XEPDB1
Multitenant container database: masked_FQDN:1523
Use https://localhost:5500/em to access Oracle Enterprise Manager for Oracle Database XE
This Completes the Oracle Database 21c Express Edition Installation on Oracle Linux 9
$ sqlplus /nolog
SQL*Plus: Release 21.0.0.0.0 - Production on Thu Dec 22 08:03:44 2022
Version 21.3.0.0.0
Copyright (c) 1982, 2021, Oracle. All rights reserved.
SQL> exit
Disconnected from Oracle Database 21c Express Edition Release 21.0.0.0.0 - Production
Version 21.3.0.0.0
There is a Group Post By Connor on LinkedIn in Oracle Senior DBA Group, showing the links to access ASKTOM Best Posts and Oracle Magazines from https://asktom.oracle.com/pls/apex/f?p=100:9
Here is the Code Snippet that helps you to download all the Posts and Magazines as HTML files as your choice of Destination in your local file system .
Ubuntu is a Linux distribution based on Debian and composed mostly of free and open-source software. Ubuntu is officially released in three editions: Desktop, Server, and Core for Internet of things devices and robots. All the editions can run on the computer alone, or in a virtual machine.
Ubuntu Can be Upgraded to the Latest using 3 simple steps.
Update – get all the Package Updates.
Upgrade – Package Upgrades to the Latest.
do-release-upgrade – do-release-upgrade handles checking for a new release, updating sources. list , and a range of other tasks, and is the officially recommended upgrade path for server upgrades which must be performed over a remote connection.
You can see if the Latest is available when you login
Microsoft Windows [Version 10.0.19044.2130]
(c) Microsoft Corporation. All rights reserved.
C:\Users\Dell>ssh root@192.168.29.159
root@192.168.29.159's password:
Welcome to Ubuntu 18.04.6 LTS (GNU/Linux 5.4.0-84-generic x86_64)
* Documentation: https://help.ubuntu.com
* Management: https://landscape.canonical.com
* Support: https://ubuntu.com/advantage
264 updates can be applied immediately.
244 of these updates are standard security updates.
To see these additional updates run: apt list --upgradable
New release '20.04.5 LTS' available.
Run 'do-release-upgrade' to upgrade to it.
Your Hardware Enablement Stack (HWE) is supported until April 2023.
The programs included with the Ubuntu system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Ubuntu comes with ABSOLUTELY NO WARRANTY, to the extent permitted by
applicable law.
root@osboxes:~#
Lets run as Suggested “do-release-upgrade “
root@osboxes:~# do-release-upgrade
Checking for a new Ubuntu release
Please install all available updates for your release before upgrading.
root@osboxes:~# apt update
Hit:1 http://us.archive.ubuntu.com/ubuntu bionic InRelease
Hit:2 http://repo.mysql.com/apt/ubuntu bionic InRelease
Get:3 http://us.archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB]
Get:4 http://security.ubuntu.com/ubuntu bionic-security InRelease [88.7 kB]
Get:5 http://us.archive.ubuntu.com/ubuntu bionic-backports InRelease [83.3 kB]
Get:6 http://us.archive.ubuntu.com/ubuntu bionic-updates/main amd64 Packages [2,786 kB]
Get:7 http://us.archive.ubuntu.com/ubuntu bionic-updates/main i386 Packages [1,558 kB]
Get:8 http://us.archive.ubuntu.com/ubuntu bionic-updates/main amd64 DEP-11 Metadata [297 kB]
Get:9 http://us.archive.ubuntu.com/ubuntu bionic-updates/universe amd64 DEP-11 Metadata [302 kB]
Get:10 http://us.archive.ubuntu.com/ubuntu bionic-updates/multiverse amd64 DEP-11 Metadata [2,468 B]
Get:11 http://security.ubuntu.com/ubuntu bionic-security/main amd64 DEP-11 Metadata [55.3 kB]
Get:12 http://security.ubuntu.com/ubuntu bionic-security/universe amd64 DEP-11 Metadata [60.9 kB]
Get:13 http://security.ubuntu.com/ubuntu bionic-security/multiverse amd64 DEP-11 Metadata [2,464 B]
Get:14 http://us.archive.ubuntu.com/ubuntu bionic-backports/main amd64 DEP-11 Metadata [8,112 B]
Get:15 http://us.archive.ubuntu.com/ubuntu bionic-backports/universe amd64 DEP-11 Metadata [10.1 kB]
Fetched 5,344 kB in 1min 38s (54.6 kB/s)
Reading package lists... Done
Building dependency tree
Reading state information... Done
3 packages can be upgraded. Run 'apt list --upgradable' to see them.
Run apt list –upgradable and restart OS to apply the Changes
root@osboxes:~# apt list --upgradable
Listing... Done
linux-generic-hwe-18.04/bionic-updates,bionic-security 5.4.0.131.147~18.04.108 amd64 [upgradable from: 5.4.0.84.94~18.04.75]
linux-headers-generic-hwe-18.04/bionic-updates,bionic-security 5.4.0.131.147~18.04.108 amd64 [upgradable from: 5.4.0.84.94~18.04.75]
linux-image-generic-hwe-18.04/bionic-updates,bionic-security 5.4.0.131.147~18.04.108 amd64 [upgradable from: 5.4.0.84.94~18.04.75]
root@osboxes:~# apt upgrade
E: Could not get lock /var/lib/dpkg/lock-frontend - open (11: Resource temporarily unavailable)
E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), is another process using it?
root@osboxes:~# init 6
Connection to 192.168.29.159 closed by remote host.
Connection to 192.168.29.159 closed.
C:\Users\Dell>ssh root@192.168.29.159
root@192.168.29.159's password:
Welcome to Ubuntu 18.04.6 LTS (GNU/Linux 5.4.0-131-generic x86_64)
* Documentation: https://help.ubuntu.com
* Management: https://landscape.canonical.com
* Support: https://ubuntu.com/advantage
0 updates can be applied immediately.
New release '20.04.5 LTS' available.
Run 'do-release-upgrade' to upgrade to it.
Your Hardware Enablement Stack (HWE) is supported until April 2023.
Last login: Mon Oct 31 10:42:15 2022 from 192.168.29.35
root@osboxes:~# do-release-upgrade
Checking for a new Ubuntu release
Get:1 Upgrade tool signature [1,554 B]
Get:2 Upgrade tool [1,337 kB]
Fetched 1,339 kB in 0s (0 B/s)
authenticate 'focal.tar.gz' against 'focal.tar.gz.gpg'
extracting 'focal.tar.gz'
Reading cache
Checking package manager
Continue running under SSH?
This session appears to be running under ssh. It is not recommended
to perform a upgrade over ssh currently because in case of failure it
is harder to recover.
If you continue, an additional ssh daemon will be started at port
'1022'.
Do you want to continue?
Continue [yN] y
Starting additional sshd
To make recovery in case of failure easier, an additional sshd will
be started on port '1022'. If anything goes wrong with the running
ssh you can still connect to the additional one.
If you run a firewall, you may need to temporarily open this port. As
this is potentially dangerous it's not done automatically. You can
open the port with e.g.:
'iptables -I INPUT -p tcp --dport 1022 -j ACCEPT'
To continue please press [ENTER]
Reading package lists... Done
Building dependency tree
Reading state information... Done
Hit http://repo.mysql.com/apt/ubuntu bionic InRelease
Hit http://us.archive.ubuntu.com/ubuntu bionic InRelease
Hit http://security.ubuntu.com/ubuntu bionic-security InRelease
Hit http://us.archive.ubuntu.com/ubuntu bionic-updates InRelease
Hit http://us.archive.ubuntu.com/ubuntu bionic-backports InRelease
Fetched 0 B in 0s (0 B/s)
Reading package lists... Done
Building dependency tree
Reading state information... Done
Checking for installed snaps
Calculating snap size requirements
Updating repository information
Third party sources disabled
Some third party entries in your sources.list were disabled. You can
re-enable them after the upgrade with the 'software-properties' tool
or your package manager.
To continue please press [ENTER]
Selecting previously unselected package libcommon-sense-perl.
(Reading database ... 225251 files and directories currently installed.)
Preparing to unpack .../libcommon-sense-perl_3.74-2build6_amd64.deb ...
Unpacking libcommon-sense-perl (3.74-2build6) ...
Selecting previously unselected package libtypes-serialiser-perl.
Preparing to unpack .../libtypes-serialiser-perl_1.0-1_all.deb ...
Unpacking libtypes-serialiser-perl (1.0-1) ...
Selecting previously unselected package libjson-xs-perl.
Preparing to unpack .../libjson-xs-perl_4.020-1build1_amd64.deb ...
Unpacking libjson-xs-perl (4.020-1build1) ...
Setting up libcommon-sense-perl (3.74-2build6) ...
Setting up libtypes-serialiser-perl (1.0-1) ...
Setting up libjson-xs-perl (4.020-1build1) ...
Processing triggers for mime-support (3.64ubuntu1) ...
Processing triggers for hicolor-icon-theme (0.17-2) ...
Processing triggers for cups (2.3.1-9ubuntu1.2) ...
Processing triggers for gnome-menus (3.36.0-1ubuntu1) ...
Processing triggers for libglib2.0-0:amd64 (2.64.6-1~ubuntu20.04.4) ...
Processing triggers for libc-bin (2.31-0ubuntu9.9) ...
Processing triggers for man-db (2.9.1-1) ...
Processing triggers for desktop-file-utils (0.24-1ubuntu3) ...
System upgrade is complete.
Restart required
To finish the upgrade, a restart is required.
If you select 'y' the system will be restarted.
Continue [yN] y
Connection to 192.168.29.159 closed by remote host.
Connection to 192.168.29.159 closed.
Successfully Upgraded to the Latest.
C:\Users\Dell>ssh root@192.168.29.159
root@192.168.29.159's password:
Welcome to Ubuntu 20.04.5 LTS (GNU/Linux 5.4.0-131-generic x86_64)
* Documentation: https://help.ubuntu.com
* Management: https://landscape.canonical.com
* Support: https://ubuntu.com/advantage
0 updates can be applied immediately.
Last login: Mon Oct 31 12:05:59 2022 from 192.168.29.35
root@osboxes:~# cat /etc/os-release
NAME="Ubuntu"
VERSION="20.04.5 LTS (Focal Fossa)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 20.04.5 LTS"
VERSION_ID="20.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=focal
UBUNTU_CODENAME=focal
root@osboxes:~#
Install MySQL Server by running apt install mysql-server
root@osboxes:~# apt install mysql-server
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
libaio1 libevent-core-2.1-6 libhtml-template-perl mysql-client-5.7 mysql-client-core-5.7 mysql-common mysql-server-5.7 mysql-server-core-5.7
Suggested packages:
libipc-sharedcache-perl mailx tinyca
The following NEW packages will be installed:
libaio1 libevent-core-2.1-6 libhtml-template-perl mysql-client-5.7 mysql-client-core-5.7 mysql-common mysql-server mysql-server-5.7 mysql-server-core-5.7
0 upgraded, 9 newly installed, 0 to remove and 259 not upgraded.
Need to get 19.5 MB of archives.
After this operation, 155 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://us.archive.ubuntu.com/ubuntu bionic/main amd64 mysql-common all 5.8+1.0.4 [7,308 B]
Get:2 http://us.archive.ubuntu.com/ubuntu bionic-updates/main amd64 libaio1 amd64 0.3.110-5ubuntu0.1 [6,476 B]
Get:3 http://us.archive.ubuntu.com/ubuntu bionic-updates/main amd64 mysql-client-core-5.7 amd64 5.7.40-0ubuntu0.18.04.1 [6,755 kB]
Get:4 http://us.archive.ubuntu.com/ubuntu bionic-updates/main amd64 mysql-client-5.7 amd64 5.7.40-0ubuntu0.18.04.1 [2,028 kB]
Get:5 http://us.archive.ubuntu.com/ubuntu bionic-updates/main amd64 mysql-server-core-5.7 amd64 5.7.40-0ubuntu0.18.04.1 [7,542 kB]
Get:6 http://us.archive.ubuntu.com/ubuntu bionic/main amd64 libevent-core-2.1-6 amd64 2.1.8-stable-4build1 [85.9 kB]
Get:7 http://us.archive.ubuntu.com/ubuntu bionic-updates/main amd64 mysql-server-5.7 amd64 5.7.40-0ubuntu0.18.04.1 [3,006 kB]
Get:8 http://us.archive.ubuntu.com/ubuntu bionic/main amd64 libhtml-template-perl all 2.97-1 [59.0 kB]
Get:9 http://us.archive.ubuntu.com/ubuntu bionic-updates/main amd64 mysql-server all 5.7.40-0ubuntu0.18.04.1 [9,944 B]
Selecting previously unselected package mysql-common.
(Reading database ... 132259 files and directories currently installed.)
Preparing to unpack .../0-mysql-common_5.8+1.0.4_all.deb ...
Unpacking mysql-common (5.8+1.0.4) ...
Selecting previously unselected package libaio1:amd64.
Preparing to unpack .../1-libaio1_0.3.110-5ubuntu0.1_amd64.deb ...
Unpacking libaio1:amd64 (0.3.110-5ubuntu0.1) ...
Selecting previously unselected package mysql-client-core-5.7.
Preparing to unpack .../2-mysql-client-core-5.7_5.7.40-0ubuntu0.18.04.1_amd64.deb ...
Unpacking mysql-client-core-5.7 (5.7.40-0ubuntu0.18.04.1) ...
Selecting previously unselected package mysql-client-5.7.
Preparing to unpack .../3-mysql-client-5.7_5.7.40-0ubuntu0.18.04.1_amd64.deb ...
Unpacking mysql-client-5.7 (5.7.40-0ubuntu0.18.04.1) ...
Selecting previously unselected package mysql-server-core-5.7.
Preparing to unpack .../4-mysql-server-core-5.7_5.7.40-0ubuntu0.18.04.1_amd64.deb ...
Unpacking mysql-server-core-5.7 (5.7.40-0ubuntu0.18.04.1) ...
Selecting previously unselected package libevent-core-2.1-6:amd64.
Preparing to unpack .../5-libevent-core-2.1-6_2.1.8-stable-4build1_amd64.deb ...
Unpacking libevent-core-2.1-6:amd64 (2.1.8-stable-4build1) ...
Setting up mysql-common (5.8+1.0.4) ...
update-alternatives: using /etc/mysql/my.cnf.fallback to provide /etc/mysql/my.cnf (my.cnf) in auto mode
Selecting previously unselected package mysql-server-5.7.
(Reading database ... 132427 files and directories currently installed.)
Preparing to unpack .../mysql-server-5.7_5.7.40-0ubuntu0.18.04.1_amd64.deb ...
Unpacking mysql-server-5.7 (5.7.40-0ubuntu0.18.04.1) ...
Selecting previously unselected package libhtml-template-perl.
Preparing to unpack .../libhtml-template-perl_2.97-1_all.deb ...
Unpacking libhtml-template-perl (2.97-1) ...
Selecting previously unselected package mysql-server.
Preparing to unpack .../mysql-server_5.7.40-0ubuntu0.18.04.1_all.deb ...
Unpacking mysql-server (5.7.40-0ubuntu0.18.04.1) ...
Setting up libevent-core-2.1-6:amd64 (2.1.8-stable-4build1) ...
Setting up libhtml-template-perl (2.97-1) ...
Setting up libaio1:amd64 (0.3.110-5ubuntu0.1) ...
Setting up mysql-client-core-5.7 (5.7.40-0ubuntu0.18.04.1) ...
Setting up mysql-server-core-5.7 (5.7.40-0ubuntu0.18.04.1) ...
Setting up mysql-client-5.7 (5.7.40-0ubuntu0.18.04.1) ...
Setting up mysql-server-5.7 (5.7.40-0ubuntu0.18.04.1) ...
update-alternatives: using /etc/mysql/mysql.cnf to provide /etc/mysql/my.cnf (my.cnf) in auto mode
Renaming removed key_buffer and myisam-recover options (if present)
Created symlink /etc/systemd/system/multi-user.target.wants/mysql.service → /lib/systemd/system/mysql.service.
Setting up mysql-server (5.7.40-0ubuntu0.18.04.1) ...#####################################################################################################################################################################...............]
Processing triggers for libc-bin (2.27-3ubuntu1.4) ...##############################################################################################################################################################################.....]
Processing triggers for systemd (237-3ubuntu10.52) ...
Processing triggers for man-db (2.8.3-2ubuntu0.1) ...
Processing triggers for ureadahead (0.100.0-21) ...
Check the MySQL Service Status using systemctl status/start/enable
root@osboxes:~# systemctl start mysql.service
root@osboxes:~# systemctl status mysql.service
● mysql.service - MySQL Community Server
Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled)
Active: active (running) since Sun 2022-10-30 09:25:22 EDT; 4min 28s ago
Main PID: 3072 (mysqld)
Tasks: 27 (limit: 4915)
CGroup: /system.slice/mysql.service
└─3072 /usr/sbin/mysqld --daemonize --pid-file=/run/mysqld/mysqld.pid
Oct 30 09:25:20 osboxes systemd[1]: Starting MySQL Community Server...
Oct 30 09:25:22 osboxes systemd[1]: Started MySQL Community Server.
root@osboxes:~# systemctl enable mysql.service
Synchronizing state of mysql.service with SysV service script with /lib/systemd/systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install enable mysql
Step 3:
mysql_secure_installation — Improve MySQL Installation Security
This program enables you to improve the security of your MySQL installation in the following ways:
You can set a password for root accounts.
You can remove root accounts that are accessible from outside the local host.
You can remove anonymous-user accounts.
You can remove the test database (which by default can be accessed by all users, even anonymous users), and privileges that permit anyone to access databases with names that start with test_.
root@osboxes:~# mysql_secure_installation
Securing the MySQL server deployment.
Connecting to MySQL using a blank password.
VALIDATE PASSWORD PLUGIN can be used to test passwords
and improve security. It checks the strength of password
and allows the users to set only those passwords which are
secure enough. Would you like to setup VALIDATE PASSWORD plugin?
Press y|Y for Yes, any other key for No: y
There are three levels of password validation policy:
LOW Length >= 8
MEDIUM Length >= 8, numeric, mixed case, and special characters
STRONG Length >= 8, numeric, mixed case, special characters and dictionary file
Please enter 0 = LOW, 1 = MEDIUM and 2 = STRONG: 2
Please set the password for root here.
New password:
Re-enter new password:
Estimated strength of the password: 100
Do you wish to continue with the password provided?(Press y|Y for Yes, any other key for No) : y
By default, a MySQL installation has an anonymous user,
allowing anyone to log into MySQL without having to have
a user account created for them. This is intended only for
testing, and to make the installation go a bit smoother.
You should remove them before moving into a production
environment.
Remove anonymous users? (Press y|Y for Yes, any other key for No) : y
Success.
Normally, root should only be allowed to connect from
'localhost'. This ensures that someone cannot guess at
the root password from the network.
Disallow root login remotely? (Press y|Y for Yes, any other key for No) : y
Success.
By default, MySQL comes with a database named 'test' that
anyone can access. This is also intended only for testing,
and should be removed before moving into a production
environment.
Remove test database and access to it? (Press y|Y for Yes, any other key for No) : y
- Dropping test database...
Success.
- Removing privileges on test database...
Success.
Reloading the privilege tables will ensure that all changes
made so far will take effect immediately.
Reload privilege tables now? (Press y|Y for Yes, any other key for No) : y
Success.
All done!
This step Completes the Installation Part. You can now login and verify.
root@osboxes:~# mysql -uroot -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 4
Server version: 5.7.40-0ubuntu0.18.04.1 (Ubuntu)
Copyright (c) 2000, 2022, Oracle and/or its affiliates.
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> select version();
+-------------------------+
| version() |
+-------------------------+
| 5.7.40-0ubuntu0.18.04.1 |
+-------------------------+
1 row in set (0.00 sec)
mysql> SHOW VARIABLES LIKE "%version%";
+-------------------------+-------------------------+
| Variable_name | Value |
+-------------------------+-------------------------+
| innodb_version | 5.7.40 |
| protocol_version | 10 |
| slave_type_conversions | |
| tls_version | TLSv1,TLSv1.1,TLSv1.2 |
| version | 5.7.40-0ubuntu0.18.04.1 |
| version_comment | (Ubuntu) |
| version_compile_machine | x86_64 |
| version_compile_os | Linux |
+-------------------------+-------------------------+
8 rows in set (0.01 sec)
mysql> create database sriram;
Query OK, 1 row affected (0.00 sec)
mysql> use sriram;
Database changed
mysql> create table sriram_table (id int, name varchar(200));
Query OK, 0 rows affected (3.82 sec)
mysql> insert into sriram_table values(1,'Sriram');
Query OK, 1 row affected (0.41 sec)
mysql> insert into sriram_table values(2,'Sriram2');
Query OK, 1 row affected (0.11 sec)
mysql> insert into sriram_table values(3,'Sriram3');
Query OK, 1 row affected (0.41 sec)
mysql> commit;
Query OK, 0 rows affected (0.11 sec)
mysql> select * from sriram_table;
+------+---------+
| id | name |
+------+---------+
| 1 | Sriram |
| 2 | Sriram2 |
| 3 | Sriram3 |
+------+---------+
3 rows in set (0.11 sec)
mysql> exit
Bye
Upgrade Paths
Upgrade from MySQL 5.7 to 8.0 is supported. However, upgrade is only supported between General Availability (GA) releases. For MySQL 8.0, it is required that you upgrade from a MySQL 5.7 GA release (5.7.9 or higher). Upgrades from non-GA releases of MySQL 5.7 are not supported.
Upgrading to the latest release is recommended before upgrading to the next version. For example, upgrade to the latest MySQL 5.7 release before upgrading to MySQL 8.0.
Upgrade that skips versions is not supported. For example, upgrading directly from MySQL 5.6 to 8.0 is not supported.
Once a release series reaches General Availability (GA) status, upgrade within the release series (from one GA version to another GA version) is supported. For example, upgrading from MySQL 8.0.x to 8.0.y is supported. (Upgrade involving development-status non-GA releases is not supported.) Skipping a release is also supported. For example, upgrading from MySQL 8.0.x to 8.0.z is supported. MySQL 8.0.11 is the first GA status release within the MySQL 8.0 release series.
Run update and upgrade to get the latest Package information and also all the Other Packages to be updated. This Step Takes a while.
Run apt-get install mysql-server to Install the Latest Version
root@osboxes:~# apt-get install mysql-server
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following package was automatically installed and is no longer required:
libevent-core-2.1-6
Use 'apt autoremove' to remove it.
The following additional packages will be installed:
libmecab2 mecab-ipadic mecab-ipadic-utf8 mecab-utils mysql-client mysql-common mysql-community-client mysql-community-client-core mysql-community-client-plugins mysql-community-server mysql-community-server-core
The following packages will be REMOVED:
mysql-client-5.7 mysql-client-core-5.7 mysql-server-5.7 mysql-server-core-5.7
The following NEW packages will be installed:
libmecab2 mecab-ipadic mecab-ipadic-utf8 mecab-utils mysql-client mysql-community-client mysql-community-client-core mysql-community-client-plugins mysql-community-server mysql-community-server-core
The following packages will be upgraded:
mysql-common mysql-server
2 upgraded, 10 newly installed, 4 to remove and 3 not upgraded.
Need to get 48.3 MB of archives.
After this operation, 202 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://repo.mysql.com/apt/ubuntu bionic/mysql-8.0 amd64 mysql-server amd64 8.0.31-1ubuntu18.04 [68.3 kB]
Get:2 http://repo.mysql.com/apt/ubuntu bionic/mysql-8.0 amd64 mysql-common amd64 8.0.31-1ubuntu18.04 [72.4 kB]
Get:3 http://repo.mysql.com/apt/ubuntu bionic/mysql-8.0 amd64 mysql-community-client-plugins amd64 8.0.31-1ubuntu18.04 [1,268 kB]
Get:4 http://us.archive.ubuntu.com/ubuntu bionic/universe amd64 libmecab2 amd64 0.996-5 [257 kB]
Get:5 http://repo.mysql.com/apt/ubuntu bionic/mysql-8.0 amd64 mysql-community-client-core amd64 8.0.31-1ubuntu18.04 [1,938 kB]
Get:6 http://us.archive.ubuntu.com/ubuntu bionic/universe amd64 mecab-utils amd64 0.996-5 [4,856 B]
Get:7 http://us.archive.ubuntu.com/ubuntu bionic/universe amd64 mecab-ipadic all 2.7.0-20070801+main-1 [12.1 MB]
Get:8 http://repo.mysql.com/apt/ubuntu bionic/mysql-8.0 amd64 mysql-community-client amd64 8.0.31-1ubuntu18.04 [3,564 kB]
Get:9 http://us.archive.ubuntu.com/ubuntu bionic/universe amd64 mecab-ipadic-utf8 all 2.7.0-20070801+main-1 [3,522 B]
Get:10 http://repo.mysql.com/apt/ubuntu bionic/mysql-8.0 amd64 mysql-client amd64 8.0.31-1ubuntu18.04 [68.3 kB]
Get:11 http://repo.mysql.com/apt/ubuntu bionic/mysql-8.0 amd64 mysql-community-server-core amd64 8.0.31-1ubuntu18.04 [28.8 MB]
Get:12 http://repo.mysql.com/apt/ubuntu bionic/mysql-8.0 amd64 mysql-community-server amd64 8.0.31-1ubuntu18.04 [79.5 kB]
Fetched 48.3 MB in 1min 8s (713 kB/s)
Preconfiguring packages ...
(Reading database ... 132608 files and directories currently installed.)
Preparing to unpack .../mysql-server_8.0.31-1ubuntu18.04_amd64.deb ...
Unpacking mysql-server (8.0.31-1ubuntu18.04) over (5.7.40-0ubuntu0.18.04.1) ...
(Reading database ... 132609 files and directories currently installed.)
Removing mysql-server-5.7 (5.7.40-0ubuntu0.18.04.1) ...
update-alternatives: using /etc/mysql/my.cnf.fallback to provide /etc/mysql/my.cnf (my.cnf) in auto mode
Removing mysql-client-5.7 (5.7.40-0ubuntu0.18.04.1) ...
Removing mysql-client-core-5.7 (5.7.40-0ubuntu0.18.04.1) ...
Removing mysql-server-core-5.7 (5.7.40-0ubuntu0.18.04.1) ...
(Reading database ... 132395 files and directories currently installed.)
Preparing to unpack .../00-mysql-common_8.0.31-1ubuntu18.04_amd64.deb ...
Unpacking mysql-common (8.0.31-1ubuntu18.04) over (5.8+1.0.4) ...
Selecting previously unselected package mysql-community-client-plugins.
Preparing to unpack .../01-mysql-community-client-plugins_8.0.31-1ubuntu18.04_amd64.deb ...
Unpacking mysql-community-client-plugins (8.0.31-1ubuntu18.04) ...
Selecting previously unselected package mysql-community-client-core.
Preparing to unpack .../02-mysql-community-client-core_8.0.31-1ubuntu18.04_amd64.deb ...
Unpacking mysql-community-client-core (8.0.31-1ubuntu18.04) ...
Selecting previously unselected package mysql-community-client.
Preparing to unpack .../03-mysql-community-client_8.0.31-1ubuntu18.04_amd64.deb ...
Unpacking mysql-community-client (8.0.31-1ubuntu18.04) ...
Selecting previously unselected package mysql-client.
Preparing to unpack .../04-mysql-client_8.0.31-1ubuntu18.04_amd64.deb ...
Unpacking mysql-client (8.0.31-1ubuntu18.04) ...
Selecting previously unselected package libmecab2:amd64.
Preparing to unpack .../05-libmecab2_0.996-5_amd64.deb ...
Unpacking libmecab2:amd64 (0.996-5) ...
Selecting previously unselected package mysql-community-server-core.
Preparing to unpack .../06-mysql-community-server-core_8.0.31-1ubuntu18.04_amd64.deb ...
Unpacking mysql-community-server-core (8.0.31-1ubuntu18.04) ...
Selecting previously unselected package mysql-community-server.
Preparing to unpack .../07-mysql-community-server_8.0.31-1ubuntu18.04_amd64.deb ...
Unpacking mysql-community-server (8.0.31-1ubuntu18.04) ...
Selecting previously unselected package mecab-utils.
Preparing to unpack .../08-mecab-utils_0.996-5_amd64.deb ...
Unpacking mecab-utils (0.996-5) ...
Selecting previously unselected package mecab-ipadic.
Preparing to unpack .../09-mecab-ipadic_2.7.0-20070801+main-1_all.deb ...
Unpacking mecab-ipadic (2.7.0-20070801+main-1) ...
Selecting previously unselected package mecab-ipadic-utf8.
Preparing to unpack .../10-mecab-ipadic-utf8_2.7.0-20070801+main-1_all.deb ...
Unpacking mecab-ipadic-utf8 (2.7.0-20070801+main-1) ...
Setting up mysql-common (8.0.31-1ubuntu18.04) ...
Installing new version of config file /etc/mysql/conf.d/mysql.cnf ...
Installing new version of config file /etc/mysql/my.cnf.fallback ...
Setting up libmecab2:amd64 (0.996-5) ...
Setting up mysql-community-client-plugins (8.0.31-1ubuntu18.04) ...
Setting up mysql-community-server-core (8.0.31-1ubuntu18.04) ...
Setting up mecab-utils (0.996-5) ...
Setting up mecab-ipadic (2.7.0-20070801+main-1) ...
Compiling IPA dictionary for Mecab. This takes long time...
reading /usr/share/mecab/dic/ipadic/unk.def ... 40
emitting double-array: 100% |###########################################|
/usr/share/mecab/dic/ipadic/model.def is not found. skipped.
reading /usr/share/mecab/dic/ipadic/Prefix.csv ... 221
reading /usr/share/mecab/dic/ipadic/Adverb.csv ... 3032
reading /usr/share/mecab/dic/ipadic/Noun.demonst.csv ... 120
reading /usr/share/mecab/dic/ipadic/Symbol.csv ... 208
reading /usr/share/mecab/dic/ipadic/Others.csv ... 2
reading /usr/share/mecab/dic/ipadic/Noun.verbal.csv ... 12146
reading /usr/share/mecab/dic/ipadic/Noun.adverbal.csv ... 795
reading /usr/share/mecab/dic/ipadic/Adj.csv ... 27210
reading /usr/share/mecab/dic/ipadic/Noun.nai.csv ... 42
reading /usr/share/mecab/dic/ipadic/Noun.name.csv ... 34202
reading /usr/share/mecab/dic/ipadic/Postp.csv ... 146
reading /usr/share/mecab/dic/ipadic/Suffix.csv ... 1393
reading /usr/share/mecab/dic/ipadic/Conjunction.csv ... 171
reading /usr/share/mecab/dic/ipadic/Postp-col.csv ... 91
reading /usr/share/mecab/dic/ipadic/Noun.others.csv ... 151
reading /usr/share/mecab/dic/ipadic/Verb.csv ... 130750
reading /usr/share/mecab/dic/ipadic/Interjection.csv ... 252
reading /usr/share/mecab/dic/ipadic/Noun.csv ... 60477
reading /usr/share/mecab/dic/ipadic/Noun.proper.csv ... 27327
reading /usr/share/mecab/dic/ipadic/Filler.csv ... 19
reading /usr/share/mecab/dic/ipadic/Noun.number.csv ... 42
reading /usr/share/mecab/dic/ipadic/Adnominal.csv ... 135
reading /usr/share/mecab/dic/ipadic/Noun.place.csv ... 72999
reading /usr/share/mecab/dic/ipadic/Auxil.csv ... 199
reading /usr/share/mecab/dic/ipadic/Noun.adjv.csv ... 3328
reading /usr/share/mecab/dic/ipadic/Noun.org.csv ... 16668
emitting double-array: 100% |###########################################|
reading /usr/share/mecab/dic/ipadic/matrix.def ... 1316x1316
emitting matrix : 100% |###########################################|
done!
update-alternatives: using /var/lib/mecab/dic/ipadic to provide /var/lib/mecab/dic/debian (mecab-dictionary) in auto mode
Setting up mysql-community-client-core (8.0.31-1ubuntu18.04) ...
Setting up mecab-ipadic-utf8 (2.7.0-20070801+main-1) ...
Compiling IPA dictionary for Mecab. This takes long time...
reading /usr/share/mecab/dic/ipadic/unk.def ... 40
emitting double-array: 100% |###########################################|
/usr/share/mecab/dic/ipadic/model.def is not found. skipped.
reading /usr/share/mecab/dic/ipadic/Prefix.csv ... 221
reading /usr/share/mecab/dic/ipadic/Adverb.csv ... 3032
reading /usr/share/mecab/dic/ipadic/Noun.demonst.csv ... 120
reading /usr/share/mecab/dic/ipadic/Symbol.csv ... 208
reading /usr/share/mecab/dic/ipadic/Others.csv ... 2
reading /usr/share/mecab/dic/ipadic/Noun.verbal.csv ... 12146
reading /usr/share/mecab/dic/ipadic/Noun.adverbal.csv ... 795
reading /usr/share/mecab/dic/ipadic/Adj.csv ... 27210
reading /usr/share/mecab/dic/ipadic/Noun.nai.csv ... 42
reading /usr/share/mecab/dic/ipadic/Noun.name.csv ... 34202
reading /usr/share/mecab/dic/ipadic/Postp.csv ... 146
reading /usr/share/mecab/dic/ipadic/Suffix.csv ... 1393
reading /usr/share/mecab/dic/ipadic/Conjunction.csv ... 171
reading /usr/share/mecab/dic/ipadic/Postp-col.csv ... 91
reading /usr/share/mecab/dic/ipadic/Noun.others.csv ... 151
reading /usr/share/mecab/dic/ipadic/Verb.csv ... 130750
reading /usr/share/mecab/dic/ipadic/Interjection.csv ... 252
reading /usr/share/mecab/dic/ipadic/Noun.csv ... 60477
reading /usr/share/mecab/dic/ipadic/Noun.proper.csv ... 27327
reading /usr/share/mecab/dic/ipadic/Filler.csv ... 19
reading /usr/share/mecab/dic/ipadic/Noun.number.csv ... 42
reading /usr/share/mecab/dic/ipadic/Adnominal.csv ... 135
reading /usr/share/mecab/dic/ipadic/Noun.place.csv ... 72999
reading /usr/share/mecab/dic/ipadic/Auxil.csv ... 199
reading /usr/share/mecab/dic/ipadic/Noun.adjv.csv ... 3328
reading /usr/share/mecab/dic/ipadic/Noun.org.csv ... 16668
emitting double-array: 100% |###########################################|
reading /usr/share/mecab/dic/ipadic/matrix.def ... 1316x1316
emitting matrix : 100% |###########################################|
done!
update-alternatives: using /var/lib/mecab/dic/ipadic-utf8 to provide /var/lib/mecab/dic/debian (mecab-dictionary) in auto mode
Setting up mysql-community-client (8.0.31-1ubuntu18.04) ...
Setting up mysql-client (8.0.31-1ubuntu18.04) ...
Setting up mysql-community-server (8.0.31-1ubuntu18.04) ...
Installing new version of config file /etc/apparmor.d/usr.sbin.mysqld ...
Installing new version of config file /etc/mysql/mysql.cnf ...
Installing new version of config file /etc/mysql/mysql.conf.d/mysqld.cnf ...
update-alternatives: using /etc/mysql/mysql.cnf to provide /etc/mysql/my.cnf (my.cnf) in auto mode
Setting up mysql-server (8.0.31-1ubuntu18.04) ...
Processing triggers for man-db (2.8.3-2ubuntu0.1) ...
Processing triggers for libc-bin (2.27-3ubuntu1.6) ...
With the Above, the Actual Upgrade has been completed and you can now verify the Version Number and your data compatibilities as below.
root@osboxes:~# mysql -v
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 11
Server version: 8.0.31 MySQL Community Server - GPL
Copyright (c) 2000, 2022, Oracle and/or its affiliates.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Reading history-file /root/.mysql_history
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> exit
Writing history-file /root/.mysql_history
Bye
root@osboxes:~# mysql -uroot -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 12
Server version: 8.0.31 MySQL Community Server - GPL
Copyright (c) 2000, 2022, Oracle and/or its affiliates.
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;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| performance_schema |
| sriram |
| sys |
+--------------------+
5 rows in set (0.01 sec)
mysql> use sriram;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
mysql> show tables;
+------------------+
| Tables_in_sriram |
+------------------+
| sriram_table |
+------------------+
1 row in set (0.00 sec)
mysql> select * from sriram_table;
+------+---------+
| id | name |
+------+---------+
| 1 | Sriram |
| 2 | Sriram2 |
| 3 | Sriram3 |
+------+---------+
3 rows in set (0.00 sec)
mysql> exit
Bye
you can also use mysqlcheck for the Incompatibilities, (The mysql_upgrade is now deprecated with this version)
root@osboxes:~# mysqlcheck --user=root -p --all-databases
Enter password:
mysql.columns_priv OK
mysql.component OK
mysql.db OK
mysql.default_roles OK
mysql.engine_cost OK
mysql.func OK
mysql.general_log OK
mysql.global_grants OK
mysql.gtid_executed OK
mysql.help_category OK
mysql.help_keyword OK
mysql.help_relation OK
mysql.help_topic OK
mysql.innodb_index_stats OK
mysql.innodb_table_stats OK
mysql.ndb_binlog_index OK
mysql.password_history OK
mysql.plugin OK
mysql.procs_priv OK
mysql.proxies_priv OK
mysql.replication_asynchronous_connection_failover OK
mysql.replication_asynchronous_connection_failover_managed OK
mysql.replication_group_configuration_version OK
mysql.replication_group_member_actions OK
mysql.role_edges OK
mysql.server_cost OK
mysql.servers OK
mysql.slave_master_info OK
mysql.slave_relay_log_info OK
mysql.slave_worker_info OK
mysql.slow_log OK
mysql.tables_priv OK
mysql.time_zone OK
mysql.time_zone_leap_second OK
mysql.time_zone_name OK
mysql.time_zone_transition OK
mysql.time_zone_transition_type OK
mysql.user OK
sriram.sriram_table OK
sys.sys_config OK
root@osboxes:~# mysqlcheck --user=root -p --all-databases --check-upgrade
Enter password:
mysql.columns_priv Table is already up to date
mysql.component Table is already up to date
mysql.db Table is already up to date
mysql.default_roles Table is already up to date
mysql.engine_cost Table is already up to date
mysql.func Table is already up to date
mysql.general_log Table is already up to date
mysql.global_grants Table is already up to date
mysql.gtid_executed Table is already up to date
mysql.help_category Table is already up to date
mysql.help_keyword Table is already up to date
mysql.help_relation Table is already up to date
mysql.help_topic Table is already up to date
mysql.innodb_index_stats Table is already up to date
mysql.innodb_table_stats Table is already up to date
mysql.ndb_binlog_index Table is already up to date
mysql.password_history Table is already up to date
mysql.plugin Table is already up to date
mysql.procs_priv Table is already up to date
mysql.proxies_priv Table is already up to date
mysql.replication_asynchronous_connection_failover Table is already up to date
mysql.replication_asynchronous_connection_failover_managed Table is already up to date
mysql.replication_group_configuration_version Table is already up to date
mysql.replication_group_member_actions Table is already up to date
mysql.role_edges Table is already up to date
mysql.server_cost Table is already up to date
mysql.servers Table is already up to date
mysql.slave_master_info Table is already up to date
mysql.slave_relay_log_info Table is already up to date
mysql.slave_worker_info Table is already up to date
mysql.slow_log Table is already up to date
mysql.tables_priv Table is already up to date
mysql.time_zone Table is already up to date
mysql.time_zone_leap_second Table is already up to date
mysql.time_zone_name Table is already up to date
mysql.time_zone_transition Table is already up to date
mysql.time_zone_transition_type Table is already up to date
mysql.user Table is already up to date
sriram.sriram_table Table is already up to date
sys.sys_config Table is already up to date
root@osboxes:~#
In my Previous post, we tried to get the blog entries as a file into a directory using web-scraping., Now lets read a web Page Entries and save the links(and content 🙂 ) as files. One can extract the Content from a web Page by reading/validating the tags as needed. In this post we are going to observe the URL Pattern for Reading and downloading the files from code.activestate.com.
code.activestate.com is one of best source to learn Python. It has around 4K+ Scripts available. lets take a look at the source.
To Read all the scripts from all the Pages, we can pass the Page number at the end using a simple for loop and we also need to replace /?in=lang-python with /download/1/ in the URL and Append https://code.activestate.com/ as a prefix to the resulted.
for x in range(1, 250, 1):
try:
reqs = requests.get("https://code.activestate.com/recipes/langs/python/?page="+str(x))
soup = BeautifulSoup(reqs.text, 'html.parser')
for link2 in soup.select(" a[href]"):
if "lang-python" in link2["href"]:
src=link2["href"].replace("/recipes","https://code.activestate.com/recipes").replace("/?in=lang-python","/download/1/")
tit =link2.get_text().replace(string.punctuation, " ").translate(str.maketrans('', '', string.punctuation))
print(tit.replace(" ","_"),src)
Download_active_state_files("c:\\Users\\Dell\\Downloads\\blogs\\",src,'UTF-8',tit.replace(" ","_"))
except:
pass
here is the complete Code to download all the scripts as .py in the given Directory.
import requests
from bs4 import BeautifulSoup
import string
import os
import urllib.request, urllib.error, urllib.parse
import sys
def Download_active_state_files(path,url,enc,title):
try:
response = urllib.request.urlopen(url)
webContent = response.read().decode(enc)
os.makedirs(path+'\\'+ 'Code_Active_state', exist_ok=True)
n=os.path.join(path+'\\'+ 'Code_Active_state',title +'.py')
f = open(n, 'w',encoding=enc)
f.write(webContent)
f.close
except:
n1=os.path.join(path+'\\'+ 'Code_Active_state_'+'Download_Error.log')
f1 = open(n1, 'w',encoding=enc)
f1.write(url)
f1.close
for x in range(1, 250, 1):
try:
reqs = requests.get("https://code.activestate.com/recipes/langs/python/?page="+str(x))
soup = BeautifulSoup(reqs.text, 'html.parser')
for link2 in soup.select(" a[href]"):
if "lang-python" in link2["href"]:
src=link2["href"].replace("/recipes","https://code.activestate.com/recipes").replace("/?in=lang-python","/download/1/")
tit =link2.get_text().replace(string.punctuation, " ").translate(str.maketrans('', '', string.punctuation))
print(tit.replace(" ","_"),src)
Download_active_state_files("c:\\Users\\Dell\\Downloads\\blogs\\",src,'UTF-8',tit.replace(" ","_"))
except:
pass
You can Compare the files downloaded with the Web Page version.
In my Previous Post, I tried to Download the Content from the Blogs and store it in the File System, This Increased my Google Search Engine Stats and Blog traffic as well.
As you can See Max views are from Canada & India. With this, I thought of writing a Python Program to create traffic to my blog by reading my posts (so far ) using Selenium and Secure VPN.As I am connected to Canada VPN, you can see the Views below, Before and after .
In General QA Performs the same for App Testing Automation using selenium web driver and JS etc, Here I am using Python. Lets see the Code Part.
import codecs
from selenium import webdriver
from webdriver_manager.chrome import ChromeDriverManager
from selenium.webdriver.common.keys import Keys
import time
import os
import pandas as pd
import requests
from lxml import etree
import random
from selenium import webdriver
from selenium.webdriver.chrome.options import Options
from selenium.webdriver.chrome.service import Service
from webdriver_manager.chrome import ChromeDriverManager
options = Options()
options.add_argument("start-maximized")
options.add_argument('--headless')
options.add_argument('--disable-gpu')
options.add_argument('--ignore-certificate-errors-spki-list')
options.add_argument('--ignore-certificate-errors')
options.add_argument("--incognito")
driver = webdriver.Chrome(service=Service(ChromeDriverManager().install()), options=options)
def create_traffic(url):
website_random_URL = url
driver.get(url)
time.sleep(5)
height = int(driver.execute_script("return document.documentElement.scrollHeight"))
driver.execute_script('window.scrollBy(0,10)')
time.sleep(10)
main_sitemap = 'https://ramoradba.com/sitemap.xml'
xmlDict = []
r = requests.get(main_sitemap)
root = etree.fromstring(r.content)
print ("The number of sitemap tags are {0}".format(len(root)))
for sitemap in root:
children = sitemap.getchildren()
xmlDict.append({'url': children[0].text})
with open('links23.txt', 'a') as f:
f.write( f'\n{children[0].text}')
pd.DataFrame(xmlDict)
col_name = ['url']
df_url = pd.read_csv("links23.txt", names=col_name)
for row in df_url.url:
print(row)
create_traffic(row)
This Part is the Main Block, reading through my Blog post URL from the Links downloaded from the sitemap.
This Code Opens the URL in the Browser and scroll, The same can be configured using while loop forever by reading random posts from the Blog URL instead of all the Posts.
The More you execute the program, You will get more Traffic. Hope you like it.
Lets Connect to Ukraine, Kyiv and get the views from there.
Lets Execute and see the Progress…..
After Execution, Views from Ukraine have been Increased.
Just Kidding !!! Its not Hacking, this is known as WEB-SCRAPING using the Powerful Python.
What is web scraping?
Web scraping is the process of using bots to extract content and data from a website. Unlike screen scraping, which only copies pixels displayed onscreen, web scraping extracts underlying HTML code and, with it, data stored in a database.
You just need a Browser, Simple & a small Python Code to get the content from the Web. First Lets see the Parts of the Code and Verify.
Step 1 : Install & Load the Python Modules
import time
import os
import pandas as pd
import requests
from lxml import etree
import random
import urllib.request, urllib.error, urllib.parse
import urllib.parse
import sys
import urllib.request
import string
Step 2: Define function to get the Name of the Site/Blog to Make it as a Folder.
Download and Ship the Bundle/RPM and its dependencies to the Server and Install as RPM /Yum Local Install. i.e. either using yum Or rpm -ivh <RPM_NAME>
[root@localhost mysql_binaries]# yum localinstall mysql-community-{server,client,common,libs}-* mysql-5.*
Loaded plugins: fastestmirror, langpacks
Examining mysql-community-server-5.7.9-1.el7.x86_64.rpm: mysql-community-server-5.7.9-1.el7.x86_64
Marking mysql-community-server-5.7.9-1.el7.x86_64.rpm to be installed
Examining mysql-community-client-5.7.9-1.el7.x86_64.rpm: mysql-community-client-5.7.9-1.el7.x86_64
Marking mysql-community-client-5.7.9-1.el7.x86_64.rpm to be installed
Examining mysql-community-common-5.7.9-1.el7.x86_64.rpm: mysql-community-common-5.7.9-1.el7.x86_64
Marking mysql-community-common-5.7.9-1.el7.x86_64.rpm to be installed
Examining mysql-community-libs-5.7.9-1.el7.x86_64.rpm: mysql-community-libs-5.7.9-1.el7.x86_64
Marking mysql-community-libs-5.7.9-1.el7.x86_64.rpm to be installed
Examining mysql-community-libs-compat-5.7.9-1.el7.x86_64.rpm: mysql-community-libs-compat-5.7.9-1.el7.x86_64
Marking mysql-community-libs-compat-5.7.9-1.el7.x86_64.rpm to be installed
Skipping: mysql-5.*, filename does not end in .rpm.
Resolving Dependencies
--> Running transaction check
---> Package mariadb-libs.x86_64 1:5.5.68-1.el7 will be obsoleted
---> Package mysql-community-client.x86_64 0:5.7.9-1.el7 will be installed
---> Package mysql-community-common.x86_64 0:5.7.9-1.el7 will be installed
---> Package mysql-community-libs.x86_64 0:5.7.9-1.el7 will be obsoleting
---> Package mysql-community-libs-compat.x86_64 0:5.7.9-1.el7 will be obsoleting
---> Package mysql-community-server.x86_64 0:5.7.9-1.el7 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
=============================================================================================================================================================================================================================================
Package Arch Version Repository Size
=============================================================================================================================================================================================================================================
Installing:
mysql-community-client x86_64 5.7.9-1.el7 /mysql-community-client-5.7.9-1.el7.x86_64 109 M
mysql-community-common x86_64 5.7.9-1.el7 /mysql-community-common-5.7.9-1.el7.x86_64 2.4 M
mysql-community-libs x86_64 5.7.9-1.el7 /mysql-community-libs-5.7.9-1.el7.x86_64 9.8 M
replacing mariadb-libs.x86_64 1:5.5.68-1.el7
mysql-community-libs-compat x86_64 5.7.9-1.el7 /mysql-community-libs-compat-5.7.9-1.el7.x86_64 9.2 M
replacing mariadb-libs.x86_64 1:5.5.68-1.el7
mysql-community-server x86_64 5.7.9-1.el7 /mysql-community-server-5.7.9-1.el7.x86_64 649 M
Transaction Summary
=============================================================================================================================================================================================================================================
Install 5 Packages
Total size: 779 M
Is this ok [y/d/N]: y
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : mysql-community-common-5.7.9-1.el7.x86_64 1/6
Installing : mysql-community-libs-5.7.9-1.el7.x86_64 2/6
Installing : mysql-community-client-5.7.9-1.el7.x86_64 3/6
Installing : mysql-community-server-5.7.9-1.el7.x86_64 4/6
Installing : mysql-community-libs-compat-5.7.9-1.el7.x86_64 5/6
Erasing : 1:mariadb-libs-5.5.68-1.el7.x86_64 6/6
Verifying : mysql-community-client-5.7.9-1.el7.x86_64 1/6
Verifying : mysql-community-libs-compat-5.7.9-1.el7.x86_64 2/6
Verifying : mysql-community-libs-5.7.9-1.el7.x86_64 3/6
Verifying : mysql-community-server-5.7.9-1.el7.x86_64 4/6
Verifying : mysql-community-common-5.7.9-1.el7.x86_64 5/6
Verifying : 1:mariadb-libs-5.5.68-1.el7.x86_64 6/6
Installed:
mysql-community-client.x86_64 0:5.7.9-1.el7 mysql-community-common.x86_64 0:5.7.9-1.el7 mysql-community-libs.x86_64 0:5.7.9-1.el7 mysql-community-libs-compat.x86_64 0:5.7.9-1.el7 mysql-community-server.x86_64 0:5.7.9-1.el7
Replaced:
mariadb-libs.x86_64 1:5.5.68-1.el7
Complete!
Enable MySQL Service using "service mysqld start"
Get the Temporary root password from /var/log/mysqld.log.
You can either change the Password using ALTER USER Or by Running Secure Installation option. i.e. mysql_secure_installation
[root@localhost mysql_binaries]# mysql_secure_installation
Securing the MySQL server deployment.
Enter password for user root:
Error: Access denied for user 'root'@'localhost' (using password: YES)
[root@localhost mysql_binaries]# mysql_secure_installation
Securing the MySQL server deployment.
Enter password for user root:
The existing password for the user account root has expired. Please set a new password.
New password:
Re-enter new password:
The 'validate_password' plugin is installed on the server.
The subsequent steps will run with the existing configuration
of the plugin.
Using existing password for root.
Estimated strength of the password: 100
Change the password for root ? ((Press y|Y for Yes, any other key for No) : n
... skipping.
By default, a MySQL installation has an anonymous user,
allowing anyone to log into MySQL without having to have
a user account created for them. This is intended only for
testing, and to make the installation go a bit smoother.
You should remove them before moving into a production
environment.
Remove anonymous users? (Press y|Y for Yes, any other key for No) : y
Success.
Normally, root should only be allowed to connect from
'localhost'. This ensures that someone cannot guess at
the root password from the network.
Disallow root login remotely? (Press y|Y for Yes, any other key for No) : y
Success.
By default, MySQL comes with a database named 'test' that
anyone can access. This is also intended only for testing,
and should be removed before moving into a production
environment.
Remove test database and access to it? (Press y|Y for Yes, any other key for No) : y
- Dropping test database...
Success.
- Removing privileges on test database...
Success.
Reloading the privilege tables will ensure that all changes
made so far will take effect immediately.
Reload privilege tables now? (Press y|Y for Yes, any other key for No) : y
Success.
All done!
You can Check the Installed Version By running the following
mysql> create database sriram;
Query OK, 1 row affected (0.00 sec)
mysql> use sriram;
Database changed
mysql> create table sriram_table (id int, name varchar(200));
Query OK, 0 rows affected (0.07 sec)
mysql> insert into sriram_table values(1,'Sriram');
Query OK, 1 row affected (0.02 sec)
mysql> insert into sriram_table values(2,'Sriram2');
Query OK, 1 row affected (0.03 sec)
mysql> insert into sriram_table values(3,'Sriram3');
Query OK, 1 row affected (0.02 sec)
mysql> commit;
Query OK, 0 rows affected (0.00 sec)
mysql> select * from sriram_table;
+------+---------+
| id | name |
+------+---------+
| 1 | Sriram |
| 2 | Sriram2 |
| 3 | Sriram3 |
+------+---------+
3 rows in set (0.00 sec)
You can run mysql_upgrade to see the information on update is needed .
mysql_upgrade saves the MySQL version number in a file named mysql_upgrade_info in the data directory. This is used to quickly check whether all tables have been checked for this release so that table-checking can be skipped.
In Our Next Post we See How to Upgrade this to the Latest Using RPM Upgrade Or Using YUM .
Upgrade from MySQL 5.7 to 8.0 is supported. However, upgrade is only supported between General Availability (GA) releases. For MySQL 8.0, it is required that you upgrade from a MySQL 5.7 GA release (5.7.9 or higher). Upgrades from non-GA releases of MySQL 5.7 are not supported.
Upgrading to the latest release is recommended before upgrading to the next version. For example, upgrade to the latest MySQL 5.7 release before upgrading to MySQL 8.0.
Upgrade that skips versions is not supported. For example, upgrading directly from MySQL 5.6 to 8.0 is not supported.
Once a release series reaches General Availability (GA) status, upgrade within the release series (from one GA version to another GA version) is supported. For example, upgrading from MySQL 8.0.x to 8.0.y is supported. (Upgrade involving development-status non-GA releases is not supported.) Skipping a release is also supported. For example, upgrading from MySQL 8.0.x to 8.0.z is supported. MySQL 8.0.11 is the first GA status release within the MySQL 8.0 release series.
[root@localhost mysql_binaries]# yum localinstall mysql-community-{server,client,common,libs}-*
Loaded plugins: fastestmirror, langpacks
Examining mysql-community-server-8.0.30-1.el7.x86_64.rpm: mysql-community-server-8.0.30-1.el7.x86_64
Marking mysql-community-server-8.0.30-1.el7.x86_64.rpm as an update to mysql-community-server-5.7.9-1.el7.x86_64
Examining mysql-community-server-debug-8.0.30-1.el7.x86_64.rpm: mysql-community-server-debug-8.0.30-1.el7.x86_64
Marking mysql-community-server-debug-8.0.30-1.el7.x86_64.rpm to be installed
Examining mysql-community-client-8.0.30-1.el7.x86_64.rpm: mysql-community-client-8.0.30-1.el7.x86_64
Marking mysql-community-client-8.0.30-1.el7.x86_64.rpm as an update to mysql-community-client-5.7.9-1.el7.x86_64
Examining mysql-community-client-plugins-8.0.30-1.el7.x86_64.rpm: mysql-community-client-plugins-8.0.30-1.el7.x86_64
Marking mysql-community-client-plugins-8.0.30-1.el7.x86_64.rpm to be installed
Examining mysql-community-common-8.0.30-1.el7.x86_64.rpm: mysql-community-common-8.0.30-1.el7.x86_64
Marking mysql-community-common-8.0.30-1.el7.x86_64.rpm as an update to mysql-community-common-5.7.9-1.el7.x86_64
Examining mysql-community-libs-8.0.30-1.el7.x86_64.rpm: mysql-community-libs-8.0.30-1.el7.x86_64
Marking mysql-community-libs-8.0.30-1.el7.x86_64.rpm as an update to mysql-community-libs-5.7.9-1.el7.x86_64
Examining mysql-community-libs-compat-8.0.30-1.el7.x86_64.rpm: mysql-community-libs-compat-8.0.30-1.el7.x86_64
Marking mysql-community-libs-compat-8.0.30-1.el7.x86_64.rpm as an update to mysql-community-libs-compat-5.7.9-1.el7.x86_64
Resolving Dependencies
--> Running transaction check
---> Package mysql-community-client.x86_64 0:5.7.9-1.el7 will be updated
---> Package mysql-community-client.x86_64 0:8.0.30-1.el7 will be an update
---> Package mysql-community-client-plugins.x86_64 0:8.0.30-1.el7 will be installed
---> Package mysql-community-common.x86_64 0:5.7.9-1.el7 will be updated
---> Package mysql-community-common.x86_64 0:8.0.30-1.el7 will be an update
---> Package mysql-community-libs.x86_64 0:5.7.9-1.el7 will be updated
---> Package mysql-community-libs.x86_64 0:8.0.30-1.el7 will be an update
---> Package mysql-community-libs-compat.x86_64 0:5.7.9-1.el7 will be updated
---> Package mysql-community-libs-compat.x86_64 0:8.0.30-1.el7 will be an update
---> Package mysql-community-server.x86_64 0:5.7.9-1.el7 will be updated
---> Package mysql-community-server.x86_64 0:8.0.30-1.el7 will be an update
---> Package mysql-community-server-debug.x86_64 0:8.0.30-1.el7 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
=============================================================================================================================================================================================================================================
Package Arch Version Repository Size
=============================================================================================================================================================================================================================================
Installing:
mysql-community-client-plugins x86_64 8.0.30-1.el7 /mysql-community-client-plugins-8.0.30-1.el7.x86_64 14 M
mysql-community-server-debug x86_64 8.0.30-1.el7 /mysql-community-server-debug-8.0.30-1.el7.x86_64 115 M
Updating:
mysql-community-client x86_64 8.0.30-1.el7 /mysql-community-client-8.0.30-1.el7.x86_64 71 M
mysql-community-common x86_64 8.0.30-1.el7 /mysql-community-common-8.0.30-1.el7.x86_64 9.9 M
mysql-community-libs x86_64 8.0.30-1.el7 /mysql-community-libs-8.0.30-1.el7.x86_64 7.6 M
mysql-community-libs-compat x86_64 8.0.30-1.el7 /mysql-community-libs-compat-8.0.30-1.el7.x86_64 3.7 M
mysql-community-server x86_64 8.0.30-1.el7 /mysql-community-server-8.0.30-1.el7.x86_64 241 M
Transaction Summary
=============================================================================================================================================================================================================================================
Install 2 Packages
Upgrade 5 Packages
Total size: 462 M
Is this ok [y/d/N]: y
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : mysql-community-client-plugins-8.0.30-1.el7.x86_64 1/12
Updating : mysql-community-common-8.0.30-1.el7.x86_64 2/12
Updating : mysql-community-libs-8.0.30-1.el7.x86_64 3/12
Updating : mysql-community-client-8.0.30-1.el7.x86_64 4/12
Updating : mysql-community-server-8.0.30-1.el7.x86_64 5/12
Installing : mysql-community-server-debug-8.0.30-1.el7.x86_64 6/12
Updating : mysql-community-libs-compat-8.0.30-1.el7.x86_64 7/12
Cleanup : mysql-community-server-5.7.9-1.el7.x86_64 8/12
Cleanup : mysql-community-client-5.7.9-1.el7.x86_64 9/12
Cleanup : mysql-community-libs-compat-5.7.9-1.el7.x86_64 10/12
Cleanup : mysql-community-libs-5.7.9-1.el7.x86_64 11/12
Cleanup : mysql-community-common-5.7.9-1.el7.x86_64 12/12
Verifying : mysql-community-common-8.0.30-1.el7.x86_64 1/12
Verifying : mysql-community-client-plugins-8.0.30-1.el7.x86_64 2/12
Verifying : mysql-community-libs-8.0.30-1.el7.x86_64 3/12
Verifying : mysql-community-client-8.0.30-1.el7.x86_64 4/12
Verifying : mysql-community-libs-compat-8.0.30-1.el7.x86_64 5/12
Verifying : mysql-community-server-8.0.30-1.el7.x86_64 6/12
Verifying : mysql-community-server-debug-8.0.30-1.el7.x86_64 7/12
Verifying : mysql-community-client-5.7.9-1.el7.x86_64 8/12
Verifying : mysql-community-libs-5.7.9-1.el7.x86_64 9/12
Verifying : mysql-community-server-5.7.9-1.el7.x86_64 10/12
Verifying : mysql-community-common-5.7.9-1.el7.x86_64 11/12
Verifying : mysql-community-libs-compat-5.7.9-1.el7.x86_64 12/12
Installed:
mysql-community-client-plugins.x86_64 0:8.0.30-1.el7 mysql-community-server-debug.x86_64 0:8.0.30-1.el7
Updated:
mysql-community-client.x86_64 0:8.0.30-1.el7 mysql-community-common.x86_64 0:8.0.30-1.el7 mysql-community-libs.x86_64 0:8.0.30-1.el7 mysql-community-libs-compat.x86_64 0:8.0.30-1.el7 mysql-community-server.x86_64 0:8.0.30-1.el7
Complete!
This completes the Upgrade from 5.7 to 8.0(Or Latest) Start the Service again and verify.
[root@localhost mysql_binaries]# service mysqld start
Redirecting to /bin/systemctl start mysqld.service
[root@localhost mysql_binaries]# service mysqld status
Redirecting to /bin/systemctl status mysqld.service
● mysqld.service - MySQL Server
Loaded: loaded (/usr/lib/systemd/system/mysqld.service; enabled; vendor preset: disabled)
Active: active (running) since Sun 2022-10-02 03:54:08 EDT; 4s ago
Docs: man:mysqld(8)
http://dev.mysql.com/doc/refman/en/using-systemd.html
Process: 21468 ExecStartPre=/usr/bin/mysqld_pre_systemd (code=exited, status=0/SUCCESS)
Main PID: 21502 (mysqld)
Status: "Server is operational"
Tasks: 39
CGroup: /system.slice/mysqld.service
└─21502 /usr/sbin/mysqld
Oct 02 03:53:16 localhost.localdomain systemd[1]: Starting MySQL Server...
Oct 02 03:54:08 localhost.localdomain systemd[1]: Started MySQL Server.
Note You can also use rpm -Uvh *.rpm to upgrade the Version.
Connect to the Database and verify if there are any errors.
[root@localhost mysql_binaries]# mysql -uroot -p************
mysql: [Warning] Using a password on the command line interface can be insecure.
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 11
Server version: 8.0.30 MySQL Community Server - GPL
Copyright (c) 2000, 2022, Oracle and/or its affiliates.
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;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| performance_schema |
| sriram |
| sys |
+--------------------+
5 rows in set (0.00 sec)
mysql> use sriram;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
mysql> show tables;
+------------------+
| Tables_in_sriram |
+------------------+
| sriram_table |
+------------------+
1 row in set (0.01 sec)
mysql> select * from sriram_table;
+------+---------+
| id | name |
+------+---------+
| 1 | Sriram |
| 2 | Sriram2 |
| 3 | Sriram3 |
+------+---------+
3 rows in set (0.00 sec)
mysql> show variables like '%version%';
+--------------------------+------------------------------+
| Variable_name | Value |
+--------------------------+------------------------------+
| admin_tls_version | TLSv1.2 |
| immediate_server_version | 999999 |
| innodb_version | 8.0.30 |
| original_server_version | 999999 |
| protocol_version | 10 |
| replica_type_conversions | |
| slave_type_conversions | |
| tls_version | TLSv1.2 |
| version | 8.0.30 |
| version_comment | MySQL Community Server - GPL |
| version_compile_machine | x86_64 |
| version_compile_os | Linux |
| version_compile_zlib | 1.2.12 |
+--------------------------+------------------------------+
13 rows in set (0.00 sec)
mysql> SELECT VERSION();
+-----------+
| VERSION() |
+-----------+
| 8.0.30 |
+-----------+
1 row in set (0.00 sec)
mysql>
Since Mysql_upgrade is deprecated and unneeded in Version 8.0.16 and later, you can run mysql_check if needed.
[root@localhost mysql_binaries]# mysql_upgrade -uroot -p
The mysql_upgrade client is now deprecated. The actions executed by the upgrade client are now done by the server.
To upgrade, please start the new MySQL binary with the older data directory. Repairing user tables is done automatically. Restart is not required after upgrade.
The upgrade process automatically starts on running a new MySQL binary with an older data directory. To avoid accidental upgrades, please use the --upgrade=NONE option with the MySQL binary. The option --upgrade=FORCE is also provided to run the server upgrade sequence on demand.
It may be possible that the server upgrade fails due to a number of reasons. In that case, the upgrade sequence will run again during the next MySQL server start. If the server upgrade fails repeatedly, the server can be started with the --upgrade=MINIMAL option to start the server without executing the upgrade sequence, thus allowing users to manually rectify the problem.
Option 2: Follow the Below steps to Complete the Upgrade Steps
Take a backup of all the Databases & Parameter /Variable Values assigned.
Stop the Service.
Remove the Installed Old Version RPM by running rpm -qa mysql* and rpm -e <RPM_LIST>
Install the Latest Version
Restore the Backup from above
Add and Apply variable as before as supported
Conclusion : We have successfully completed the MySQL Community Server Version Upgrade on a standalone Server from 5.7 to 8.0.30