My Experiences with Databases & More

Oracle-MySQL-SQL SERVER-Python-Azure-AWS-Oracle Cloud-GCP etc

  • Enter your email address to follow this blog and receive notifications of new posts by email.

  • Total Views

    • 558,488 hits
  • $riram $anka


    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.

Download Youtube ( Channel ) videos using Python Module – Pytube ,scrapetube.

Posted by Sriram Sanka on April 25, 2023


In this post, I will present the code to download Youtube Individual/Channel Videos step-by-step.

You can download the Videos using pytube module by passing the video URL as an argument. Just Install pytube and run as below.

python -m pip install pytube

This will download the given video URL to your current Directory, what about if you want to store your local copy for your educational purpose when you are offline.? The following will download the all the videos from the given URL to your desired location in the PC.

import requests
import re
from bs4 import BeautifulSoup
from pytube.cli import on_progress
from pytube import YouTube
from pytube import Playlist
from pytube import Channel


def get_youtube(i):
    try:
        yt = YouTube(i,on_progress_callback=on_progress)
        yt.streams.filter(progressive=True, file_extension='mp4').order_by('resolution').desc().first().download('C:\\Users\\Dell\\Videos\\downs\\Sriram_Channel\\')
    except:
        print(f'\nError in downloading:  {yt.title} from -->' + i)
        pass
l = Channel('https://www.youtube.com/channel/UCw43xCtkl26vGIGtzBoaWEw')

for video in l.video_urls:
    get_youtube(video)

You may get regular Expression error in fetching the video information due to changes implemented in the channel URL using symbols. or any other restrictions which are unsupported by the pytube module, either you have to download and install the latest or identify and fix it on your own.

To avoid this, you can use another module called scrapetube

pip install scrapetube

The following code will give you the Video id from the URL provided as input. you need to append ‘https://www.youtube.com/watch?v=’ to mark that as a complete URL.

import scrapetube

videos = scrapetube.get_channel("........t7XvGJ3AGpSon.......")

for video in videos:
    print('https://www.youtube.com/watch?v='+ video['videoId'])

as you can see channel id is the key here, what if you are unaware of channel id.? You can get the channel id either from browser view page source or you can also use “requests” and “BeautifulSoup” module to get the channel ID

import requests
from bs4 import BeautifulSoup

url = input("Please Enter youtube channel URL ")
response = requests.get(url)
soup = BeautifulSoup(response.content,'html.parser')
print(soup.find("meta", itemprop="channelId")['content'])

Instead of using Channel from pytube module, to make it easier lets make changes to the original code snippet posted above, using module “scrapetube.get_channel “

import requests
import re
from bs4 import BeautifulSoup
from pytube.cli import on_progress
from pytube import YouTube
from pytube import Playlist
from pytube import Channel
import scrapetube
import json

def get_youtube(i):
    try:
        print('Downloading ' +i)
        yt = YouTube(i,on_progress_callback=on_progress)
        #print(f'\nStarted downloading:  {yt} from -->' + i)
        yt.streams.filter(progressive=True, file_extension='mp4').order_by('resolution').desc().first().download('C:\\Users\\Dell\\Videos\\downs\\Sriram_Channel\\')
    except:
        print('Error Downloading' +i)
        pass
l = scrapetube.get_channel("UCw43xCtkl26vGIGtzBoaWEw")
for video in l:
    #print('Downloading https://www.youtube.com/watch?v='+ video['videoId'])
    get_youtube('https://www.youtube.com/watch?v='+ video['videoId'])

Hope you like it ! Happy Reading.

Advertisement

Posted in Python, pytube, scrapetube, WebScraping, youtube | Tagged: , , , , , , | Leave a Comment »

Reading Chrome Bookmarks using Python Module chrome_bookmarks

Posted by Sriram Sanka on April 24, 2023


Chrome Browser Bookmark file is in JSON format whereas history file is a database format. One can read the data file using SQLite(DB Browser) to get the URL and downloads data.

In this post I am using chrome-bookmarks module to read the bookmarks and print the URL along with it Name and Folder Information.

Install chrome-bookmarks module using pip

pip install chrome-bookmarks

Now you can read the URL from Python as below.

import chrome_bookmarks
for url in chrome_bookmarks.urls:
    print(url.url)

We Can also print the URL Description/Name as below.

import chrome_bookmarks
for url in chrome_bookmarks.urls:
    print(url.url, url.name)
import chrome_bookmarks

for folder in chrome_bookmarks.folders:
    print(folder.name)
    print(folder.folders)

It is also possible to read the JSON without using the above module.

import json
file ="C:\\Users\\Dell\\AppData\\Local\\Google\\Chrome\\User Data\\Default\\Bookmarks"
with open(file, "r", encoding='utf-8') as bookmarks:
    bookmark_data = json.load(bookmarks)
    print(json.dumps(bookmark_data, indent=1))

{
 "checksum": "7b7d115080ddda0dcab6b428f64aa3a5",
 "roots": {
  "bookmark_bar": {
   "children": [
    {
     "date_added": "13326789370504643",
     "date_last_used": "0",
     "guid": "5c3e2329-1d0c-4a9d-b85e-426d6fd31301",
     "id": "62",
     "meta_info": {
      "power_bookmark_meta": ""
     },
     "name": "Oracle | Cloud Applications and Cloud Platform",
     "type": "url",
     "url": "https://www.oracle.com/"
    },
    {
     "date_added": "13326789428536219",
     "date_last_used": "0",
     "guid": "0a972887-7f34-41b3-bf59-1f2f2f521a0e",
     "id": "63",
     "meta_info": {
      "power_bookmark_meta": ""
     },
     "name": "Oracle Database Features",
     "type": "url",
     "url": "https://apex.oracle.com/database-features/"
    },
    {
     "date_added": "13326789439984046",
     "date_last_used": "0",
     "guid": "25e1d231-a825-46fd-a8a9-829bf07dc5bf",
     "id": "64",
     "meta_info": {
      "power_bookmark_meta": ""
     },
     "name": "Cloud Sign In",
     "type": "url",
     "url": "https://www.oracle.com/cloud/sign-in.html?redirect_uri=https%3A%2F%2Fcloud.oracle.com%2F"
    },
    {
     "date_added": "13326789456087992",
     "date_last_used": "0",
     "guid": "a0e39859-9596-47be-bc61-d6099f152fb1",
     "id": "65",
     "meta_info": {
      "power_bookmark_meta": ""
     },
     "name": "Oracle Blogs",
     "type": "url",
     "url": "https://blogs.oracle.com/"
    },
    {
     "children": [
      {
       "date_added": "13326789491584887",
       "date_last_used": "0",
       "guid": "b6f90dec-e303-4a2b-bb53-a7357c8d694f",
       "id": "67",
       "meta_info": {
        "power_bookmark_meta": ""
       },
       "name": "Oracle | Cloud Applications and Cloud Platform",
       "type": "url",
       "url": "https://www.oracle.com/"
      },
      {
       "date_added": "13326789491585797",
       "date_last_used": "0",
       "guid": "ffeea96a-87d7-4053-b674-7ac9cfb50a13",
       "id": "68",
       "meta_info": {
        "power_bookmark_meta": ""
       },
       "name": "Oracle Database Features",
       "type": "url",
       "url": "https://apex.oracle.com/database-features/"
      },
      {
       "children": [
        {
         "date_added": "13326789491586570",
         "date_last_used": "0",
         "guid": "851ce296-3918-47ab-981a-21fcab632edc",
         "id": "70",
         "meta_info": {
          "power_bookmark_meta": ""
         },
         "name": "Oracle Blogs",
         "type": "url",
         "url": "https://blogs.oracle.com/"
        },
        {
         "date_added": "13326789491586243",
         "date_last_used": "0",
         "guid": "5b21937d-66d9-4eea-9491-7d7c2e22152b",
         "id": "69",
         "meta_info": {
          "power_bookmark_meta": ""
         },
         "name": "Cloud Sign In",
         "type": "url",
         "url": "https://www.oracle.com/cloud/sign-in.html?redirect_uri=https%3A%2F%2Fcloud.oracle.com%2F"
        }
       ],
       "date_added": "13326789519632624",
       "date_last_used": "0",
       "date_modified": "13326789527363048",
       "guid": "9b0bbece-a9fd-4678-a846-896b7a2a54ec",
       "id": "71",
       "name": "Oracle_Child",
       "type": "folder"
      }
     ],
     "date_added": "13326789485096843",
     "date_last_used": "0",
     "date_modified": "13326789519632800",
     "guid": "ea6663fa-05df-4751-b25b-125561aed88d",
     "id": "66",
     "name": "Oracle",
     "type": "folder"
    }
   ],
   "date_added": "13326774450786953",
   "date_last_used": "0",
   "date_modified": "13326789491586570",
   "guid": "0bc5d13f-2cba-5d74-951f-3f233fe6c908",
   "id": "1",
   "name": "Bookmarks bar",
   "type": "folder"
  },
  "other": {
   "children": [],
   "date_added": "13326774450786955",
   "date_last_used": "0",
   "date_modified": "0",
   "guid": "82b081ec-3dd3-529c-8475-ab6c344590dd",
   "id": "2",
   "name": "Other bookmarks",
   "type": "folder"
  },
  "synced": {
   "children": [],
   "date_added": "13326774450786957",
   "date_last_used": "0",
   "date_modified": "0",
   "guid": "4cf2e351-0e85-532b-bb37-df045d8f8d0f",
   "id": "3",
   "name": "Mobile bookmarks",
   "type": "folder"
  }
 },
 "version": 1
}

Hope you like it. ! Happy learning.

Posted in Python | Tagged: | Leave a Comment »

Step By Step Instructions on Installing Azure ARM template test toolkit

Posted by Sriram Sanka on April 5, 2023


Azure ARM Template Validation Tool Kit helps you to validate & meet the Requirements to Publish your Solution to Azure Market Place.

You can Download the Latest Toolkit from https://github.com/Azure/arm-ttk/releases .

  • Download and Extract(unzip) arm-ttk.zip file
  • Start the Power Shell as administrator
  • Navigate to the Extracted Folder/Directory.
  • Unblock the script files Using “Get-ChildItem *.ps1, *.psd1, *.ps1xml, *.psm1 -Recurse | Unblock-File”
  • Import the module using ” Import-Module .\arm-ttk.psd1 “
  • Validate Templates using module “Test-AzTemplate”
Get-ChildItem *.ps1, *.psd1, *.ps1xml, *.psm1 -Recurse | Unblock-File
Import-Module .\arm-ttk.psd1
Test-AzTemplate -TemplatePath \path\to\template

Download and Extract(unzip) arm-ttk.zip file

Start the Power Shell as administrator & Navigate to the Extracted Folder/Directory.

Unblock the script files Using “Get-ChildItem *.ps1, *.psd1, *.ps1xml, *.psm1 -Recurse | Unblock-File”

Import the module using ” Import-Module .\arm-ttk.psd1 “

https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_execution_policies?view=powershell-7.3

As mentioned in the Error, we need to Enable Execution Policy as Remote Signed to Local Machine to avoid the above Error.

Note : If you do not wish to Import the Module, You can still run the Test-AzTemplate as Local using “./Test-AzTemplate ” check the help provided for more Details.

Run “Test-AzTemplate -TemplatePath \path\to\template” to validate your ARM Templates (In My Case UI Definition and MainTemplate)

Fix the Reported issues and revalidate.

PS D:\ARMTTK\arm-ttk> Test-AzTemplate -TemplatePath "D:\ARMTTK\XcellNoWorkFlow\"                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Validating XcellNoWorkFlow\createUiDefinition.json                                                                                                                                                                                                                               JSONFiles Should Be Valid                                                                                                                                                                                                                                                        [+] JSONFiles Should Be Valid (30 ms)                                                                                                                                                                                                                                        Allowed Values Should Actually Be Allowed                                                                                                                                                                                                                                        [+] Allowed Values Should Actually Be Allowed (100 ms)                                                                                                                                                                                                                       Controls In Outputs Must Exist                                                                                                                                                                                                                                                   [+] Controls In Outputs Must Exist (19 ms)                                                                                                                                                                                                                                   CreateUIDefinition Must Not Have Blanks                                                                                                                                                                                                                                          [+] CreateUIDefinition Must Not Have Blanks (21 ms)                                                                                                                                                                                                                          CreateUIDefinition Should Have Schema                                                                                                                                                                                                                                            [+] CreateUIDefinition Should Have Schema (13 ms)                                                                                                                                                                                                                            Credential Confirmation Should Not Be Hidden                                                                                                                                                                                                                                     [+] Credential Confirmation Should Not Be Hidden (93 ms)                                                                                                                                                                                                                     Handler Must Be Correct                                                                                                                                                                                                                                                          [+] Handler Must Be Correct (10 ms)                                                                                                                                                                                                                                          HideExisting Must Be Correctly Handled                                                                                                                                                                                                                                           [+] HideExisting Must Be Correctly Handled (154 ms)                                                                                                                                                                                                                          Location Should Be In Outputs                                                                                                                                                                                                                                                    [+] Location Should Be In Outputs (9 ms)                                                                                                                                                                                                                                     Outputs Must Be Present In Template Parameters                                                                                                                                                                                                                                   [+] Outputs Must Be Present In Template Parameters (10 ms)                                                                                                                                                                                                                   Parameters Without Default Must Exist In CreateUIDefinition                                                                                                                                                                                                                      [+] Parameters Without Default Must Exist In CreateUIDefinition (20 ms)                                                                                                                                                                                                      Password Textboxes Must Be Used For Password Parameters                                                                                                                                                                                                                          [+] Password Textboxes Must Be Used For Password Parameters (65 ms)                                                                                                                                                                                                          PasswordBoxes Must Have Min Length                                                                                                                                                                                                                                               [+] PasswordBoxes Must Have Min Length (60 ms)                                                                                                                                                                                                                               Textboxes Are Well Formed                                                                                                                                                                                                                                                        [?] Textboxes Are Well Formed (66 ms)                                                                                                                                                                                                                                              TextBox 'AppLoginEmail' regex does not have a length constraint.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Tooltips Should Be Present                                                                                                                                                                                                                                                       [+] Tooltips Should Be Present (66 ms)                                                                                                                                                                                                                                       Usernames Should Not Have A Default                                                                                                                                                                                                                                              [+] Usernames Should Not Have A Default (61 ms)                                                                                                                                                                                                                              Validations Must Have Message                                                                                                                                                                                                                                                    [+] Validations Must Have Message (60 ms)                                                                                                                                                                                                                                    VMSizes Must Match Template                                                                                                                                                                                                                                                      [+] VMSizes Must Match Template (62 ms)                                                                                                                                                                                                                                    Validating XcellNoWorkFlow\mainTemplate.json                                                                                                                                                                                                                                     adminUsername Should Not Be A Literal                                                                                                                                                                                                                                            [+] adminUsername Should Not Be A Literal (59 ms)                                                                                                                                                                                                                            apiVersions Should Be Recent In Reference Functions                                                                                                                                                                                                                              [+] apiVersions Should Be Recent In Reference Functions (11 ms)                                                                                                                                                                                                              apiVersions Should Be Recent                                                                                                                                                                                                                                                     [+] apiVersions Should Be Recent (117 ms)
  artifacts parameter
    [+] artifacts parameter (18 ms)
  CommandToExecute Must Use ProtectedSettings For Secrets
    [+] CommandToExecute Must Use ProtectedSettings For Secrets (68 ms)
  DependsOn Best Practices
    [+] DependsOn Best Practices (59 ms)
  Deployment Resources Must Not Be Debug
    [+] Deployment Resources Must Not Be Debug (56 ms)
  DeploymentTemplate Must Not Contain Hardcoded Uri
    [+] DeploymentTemplate Must Not Contain Hardcoded Uri (14 ms)
  DeploymentTemplate Schema Is Correct
    [+] DeploymentTemplate Schema Is Correct (9 ms)
  Dynamic Variable References Should Not Use Concat
    [+] Dynamic Variable References Should Not Use Concat (12 ms)
  IDs Should Be Derived From ResourceIDs
    [+] IDs Should Be Derived From ResourceIDs (67 ms)
  Location Should Not Be Hardcoded
    [+] Location Should Not Be Hardcoded (154 ms)
  ManagedIdentityExtension must not be used
    [+] ManagedIdentityExtension must not be used (10 ms)
  Min And Max Value Are Numbers
    [+] Min And Max Value Are Numbers (10 ms)
  Outputs Must Not Contain Secrets
    [+] Outputs Must Not Contain Secrets (12 ms)
  Parameter Types Should Be Consistent
    [+] Parameter Types Should Be Consistent (87 ms)
  Parameters Must Be Referenced
    [+] Parameters Must Be Referenced (52 ms)
  Password params must be secure
    [+] Password params must be secure (16 ms)
  providers apiVersions Is Not Permitted
    [+] providers apiVersions Is Not Permitted (18 ms)
  ResourceIds should not contain
    [+] ResourceIds should not contain (22 ms)
  Resources Should Have Location
    [+] Resources Should Have Location (11 ms)
  Resources Should Not Be Ambiguous
    [+] Resources Should Not Be Ambiguous (12 ms)
  Secure Params In Nested Deployments
    [+] Secure Params In Nested Deployments (56 ms)
  Secure String Parameters Cannot Have Default
    [+] Secure String Parameters Cannot Have Default (12 ms)
  Template Should Not Contain Blanks
    [+] Template Should Not Contain Blanks (164 ms)
  URIs Should Be Properly Constructed
    [+] URIs Should Be Properly Constructed (173 ms)
  Variables Must Be Referenced
    [+] Variables Must Be Referenced (11 ms)
  Virtual Machines Should Not Be Preview
    [+] Virtual Machines Should Not Be Preview (64 ms)
  VM Images Should Use Latest Version
    [+] VM Images Should Use Latest Version (9 ms)
  VM Size Should Be A Parameter
    [+] VM Size Should Be A Parameter (82 ms)

Pass  : 48
Fail  : 0
Total : 48

Restrict the Execution Policy to its previous state.

Hope you find it useful, Happy Learning.

Posted in ARM Template, ARM-TTK, Azure, Cloud, Installation, Microsoft Azure Cloud ARM Template | Tagged: , , , , , , | Leave a Comment »

Oracle Database 21c Express Edition (XE) RPM Installation On Oracle Linux 9

Posted by Sriram Sanka on March 29, 2023


What is Oracle Express Edition

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)

You can Download Oracle XE from https://www.oracle.com/nl/database/technologies/xe-downloads.html but its not available for Oracle Linux Version 9, In this article we are going install OL8 Version in OL9.

Pre- Installation

1. Make sure to have FQDN(fully qualified domain name) and an Entry with the same in /etc/hosts file.

2. Install dependent rpm compat-openssl10 , This can be downloaded from https://dl.rockylinux.org/pub/rocky/8/AppStream/x86_64/os/Packages/c/compat-openssl10-1.0.2o-4.el8_6.x86_64.rpm

wget https://dl.rockylinux.org/pub/rocky/8/AppStream/x86_64/os/Packages/c/compat-openssl10-1.0.2o-4.el8_6.x86_64.rpm
--2022-12-22 07:06:53--  https://dl.rockylinux.org/pub/rocky/8/AppStream/x86_64/os/Packages/c/compat-openssl10-1.0.2o-4.el8_6.x86_64.rpm
Resolving dl.rockylinux.org (dl.rockylinux.org)... 199.232.194.132, 199.232.198.132, 2a04:4e42:4d::644, ...
Connecting to dl.rockylinux.org (dl.rockylinux.org)|199.232.194.132|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1182640 (1.1M) [application/x-redhat-package-manager]
Saving to: ‘compat-openssl10-1.0.2o-4.el8_6.x86_64.rpm’
 
compat-openssl10-1.0.2o-4.el8_6.x86_64.rpm                  100%[========================================================================================================================================>]   1.13M  --.-KB/s    in 0.04s
 
2022-12-22 07:06:53 (30.2 MB/s) - ‘compat-openssl10-1.0.2o-4.el8_6.x86_64.rpm’ saved [1182640/1182640]
dnf -y localinstall compat-openssl10-1.0.2o-4.el8_6.x86_64.rpm
Last metadata expiration check: 3:41:22 ago on Thu 22 Dec 2022 03:25:41 AM EST.
Dependencies resolved.
=============================================================================================================================================================================================================================================
 Package                                                    Architecture                                     Version                                                       Repository                                                   Size
=============================================================================================================================================================================================================================================
Installing:
 compat-openssl10                                           x86_64                                           1:1.0.2o-4.el8_6                                              @commandline                                                1.1 M
Installing dependencies:
 make                                                       x86_64                                           1:4.3-7.el9                                                   ol9_baseos_latest                                           571 k
 
Transaction Summary
=============================================================================================================================================================================================================================================
Install  2 Packages
 
Total size: 1.7 M
Total download size: 571 k
Installed size: 4.5 M
Downloading Packages:
make-4.3-7.el9.x86_64.rpm                                                                                                                                                                                    267 kB/s | 571 kB     00:02
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                                                                                                        267 kB/s | 571 kB     00:02
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                                                                                                                                                                     1/1
  Installing       : make-1:4.3-7.el9.x86_64                                                                                                                                                                                             1/2
  Installing       : compat-openssl10-1:1.0.2o-4.el8_6.x86_64                                                                                                                                                                            2/2
  Running scriptlet: compat-openssl10-1:1.0.2o-4.el8_6.x86_64                                                                                                                                                                            2/2
  Verifying        : make-1:4.3-7.el9.x86_64                                                                                                                                                                                             1/2
  Verifying        : compat-openssl10-1:1.0.2o-4.el8_6.x86_64                                                                                                                                                                            2/2
 
Installed:
  compat-openssl10-1:1.0.2o-4.el8_6.x86_64                                                                                      make-1:4.3-7.el9.x86_64
 
Complete!

Download and Install Required Softwares

Download , Install the PreInstall RPM and Database RPM using dnf / yum .

# OL8
#dnf install -y oracle-database-preinstall-21c
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
dnf -y localinstall oracle-database-xe-21c-1.0-1.ol8.x86_64.rpm

Downloading Database Software 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

Install PreInstall RPM

yum -y localinstall oracle-database-preinstall-21c-1.0-1.el8.x86_64.rpm
Last metadata expiration check: 3:41:31 ago on Thu 22 Dec 2022 03:25:41 AM EST.
Dependencies resolved.
=============================================================================================================================================================================================================================================
 Package                                                             Architecture                                Version                                                        Repository                                              Size
=============================================================================================================================================================================================================================================
Installing:
 oracle-database-preinstall-21c                                      x86_64                                      1.0-1.el8                                                      @commandline                                            30 k
Installing dependencies:
 bc                                                                  x86_64                                      1.07.1-14.el9                                                  ol9_baseos_latest                                      135 k
 bind-libs                                                           x86_64                                      32:9.16.23-5.el9_1                                             ol9_appstream                                          1.2 M
 bind-license                                                        noarch                                      32:9.16.23-5.el9_1                                             ol9_appstream                                           13 k
 bind-utils                                                          x86_64                                      32:9.16.23-5.el9_1                                             ol9_appstream                                          224 k
 binutils                                                            x86_64                                      2.35.2-24.0.1.el9                                              ol9_baseos_latest                                      4.8 M
 binutils-gold                                                       x86_64                                      2.35.2-24.0.1.el9                                              ol9_baseos_latest                                      743 k
 checkpolicy                                                         x86_64                                      3.4-1.el9                                                      ol9_appstream                                          355 k
 fstrm                                                               x86_64                                      0.6.1-3.el9                                                    ol9_appstream                                           28 k
 glibc-devel                                                         x86_64                                      2.34-40.0.1.el9                                                ol9_appstream                                           62 k
 glibc-headers                                                       x86_64                                      2.34-40.0.1.el9                                                ol9_appstream                                          910 k
 gssproxy                                                            x86_64                                      0.8.4-4.el9                                                    ol9_baseos_latest                                      120 k
 initscripts                                                         x86_64                                      10.11.5-1.el9                                                  ol9_baseos_latest                                      287 k
 kernel-headers                                                      x86_64                                      5.14.0-162.6.1.el9_1                                           ol9_appstream                                          4.2 M
 keyutils                                                            x86_64                                      1.6.1-4.el9                                                    ol9_baseos_latest                                       74 k
 ksh                                                                 x86_64                                      3:1.0.0~beta.1-2.0.1.el9                                       ol9_appstream                                          891 k
 libICE                                                              x86_64                                      1.0.10-8.el9                                                   ol9_appstream                                           71 k
 libSM                                                               x86_64                                      1.2.3-10.el9                                                   ol9_appstream                                           42 k
 libX11                                                              x86_64                                      1.7.0-7.el9                                                    ol9_appstream                                          648 k
 libX11-common                                                       noarch                                      1.7.0-7.el9                                                    ol9_appstream                                          350 k
 libX11-xcb                                                          x86_64                                      1.7.0-7.el9                                                    ol9_appstream                                           12 k
 libXau                                                              x86_64                                      1.0.9-8.el9                                                    ol9_appstream                                           36 k
 libXcomposite                                                       x86_64                                      0.4.5-7.el9                                                    ol9_appstream                                           29 k
 libXext                                                             x86_64                                      1.3.4-8.el9                                                    ol9_appstream                                           40 k
 libXi                                                               x86_64                                      1.7.10-8.el9                                                   ol9_appstream                                           40 k
 libXinerama                                                         x86_64                                      1.1.4-10.el9                                                   ol9_appstream                                           15 k
 libXmu                                                              x86_64                                      1.1.3-8.el9                                                    ol9_appstream                                           79 k
 libXrandr                                                           x86_64                                      1.5.2-8.el9                                                    ol9_appstream                                           28 k
 libXrender                                                          x86_64                                      0.9.10-16.el9                                                  ol9_appstream                                           28 k
 libXt                                                               x86_64                                      1.2.0-6.el9                                                    ol9_appstream                                          180 k
 libXtst                                                             x86_64                                      1.2.3-16.el9                                                   ol9_appstream                                           21 k
 libXv                                                               x86_64                                      1.0.11-16.el9                                                  ol9_appstream                                           19 k
 libXxf86dga                                                         x86_64                                      1.1.5-8.el9                                                    ol9_appstream                                           21 k
 libXxf86vm                                                          x86_64                                      1.1.4-18.el9                                                   ol9_appstream                                           19 k
 libdmx                                                              x86_64                                      1.1.4-12.el9                                                   ol9_appstream                                           17 k
 libev                                                               x86_64                                      4.33-5.el9                                                     ol9_baseos_latest                                       53 k
 libmaxminddb                                                        x86_64                                      1.5.2-3.el9                                                    ol9_appstream                                           34 k
 libnfsidmap                                                         x86_64                                      1:2.5.4-15.el9                                                 ol9_baseos_latest                                       72 k
 libnsl                                                              x86_64                                      2.34-40.0.1.el9                                                ol9_baseos_latest                                       69 k
 libuv                                                               x86_64                                      1:1.42.0-1.el9                                                 ol9_appstream                                          158 k
 libverto-libev                                                      x86_64                                      0.3.2-3.el9                                                    ol9_baseos_latest                                       14 k
 libxcb                                                              x86_64                                      1.13.1-9.el9                                                   ol9_appstream                                          251 k
 libxcrypt-devel                                                     x86_64                                      4.4.18-3.el9                                                   ol9_appstream                                           42 k
 lm_sensors-libs                                                     x86_64                                      3.6.0-10.el9                                                   ol9_appstream                                           42 k
 net-tools                                                           x86_64                                      2.0-0.62.20160912git.el9                                       ol9_baseos_latest                                      344 k
 nfs-utils                                                           x86_64                                      1:2.5.4-15.el9                                                 ol9_baseos_latest                                      507 k
 pcp-conf                                                            x86_64                                      5.3.7-7.el9                                                    ol9_appstream                                           38 k
 pcp-libs                                                            x86_64                                      5.3.7-7.el9                                                    ol9_appstream                                          612 k
 policycoreutils-python-utils                                        noarch                                      3.4-4.el9                                                      ol9_appstream                                          111 k
 protobuf-c                                                          x86_64                                      1.3.3-12.el9                                                   ol9_baseos_latest                                       40 k
 python3-audit                                                       x86_64                                      3.0.7-103.el9                                                  ol9_appstream                                           88 k
 python3-libsemanage                                                 x86_64                                      3.4-2.el9                                                      ol9_appstream                                           85 k
 python3-policycoreutils                                             noarch                                      3.4-4.el9                                                      ol9_appstream                                          2.3 M
 python3-pyyaml                                                      x86_64                                      5.4.1-6.0.1.el9                                                ol9_baseos_latest                                      258 k
 python3-setools                                                     x86_64                                      4.4.0-5.el9                                                    ol9_baseos_latest                                      795 k
 python3-setuptools                                                  noarch                                      53.0.0-10.el9                                                  ol9_baseos_latest                                      1.3 M
 quota                                                               x86_64                                      1:4.06-6.el9                                                   ol9_baseos_latest                                      212 k
 quota-nls                                                           noarch                                      1:4.06-6.el9                                                   ol9_baseos_latest                                       84 k
 rpcbind                                                             x86_64                                      1.2.6-5.el9                                                    ol9_baseos_latest                                       69 k
 smartmontools                                                       x86_64                                      1:7.2-6.el9                                                    ol9_baseos_latest                                      578 k
 sssd-nfs-idmap                                                      x86_64                                      2.7.3-4.0.1.el9_1.1                                            ol9_baseos_latest                                       45 k
 sysstat                                                             x86_64                                      12.5.4-3.0.1.el9                                               ol9_appstream                                          539 k
 unzip                                                               x86_64                                      6.0-56.0.1.el9                                                 ol9_baseos_latest                                      195 k
 xorg-x11-utils                                                      x86_64                                      7.5-40.el9                                                     ol9_appstream                                          123 k
 xorg-x11-xauth                                                      x86_64                                      1:1.1-10.el9                                                   ol9_appstream                                           36 k
 
Transaction Summary
=============================================================================================================================================================================================================================================
Install  65 Packages
 
Total size: 25 M
Total download size: 25 M
Installed size: 73 M
Downloading Packages:
(1/64): bc-1.07.1-14.el9.x86_64.rpm                                                                                                                                                                           58 kB/s | 135 kB     00:02
(2/64): gssproxy-0.8.4-4.el9.x86_64.rpm                                                                                                                                                                      2.8 MB/s | 120 kB     00:00
(3/64): binutils-gold-2.35.2-24.0.1.el9.x86_64.rpm                                                                                                                                                           286 kB/s | 743 kB     00:02
(4/64): keyutils-1.6.1-4.el9.x86_64.rpm                                                                                                                                                                      2.6 MB/s |  74 kB     00:00
(5/64): libev-4.33-5.el9.x86_64.rpm                                                                                                                                                                          2.2 MB/s |  53 kB     00:00
(6/64): libnfsidmap-2.5.4-15.el9.x86_64.rpm                                                                                                                                                                  2.5 MB/s |  72 kB     00:00
(7/64): binutils-2.35.2-24.0.1.el9.x86_64.rpm                                                                                                                                                                1.7 MB/s | 4.8 MB     00:02
(8/64): libverto-libev-0.3.2-3.el9.x86_64.rpm                                                                                                                                                                208 kB/s |  14 kB     00:00
(9/64): net-tools-2.0-0.62.20160912git.el9.x86_64.rpm                                                                                                                                                        8.0 MB/s | 344 kB     00:00
(10/64): nfs-utils-2.5.4-15.el9.x86_64.rpm                                                                                                                                                                   8.6 MB/s | 507 kB     00:00
(11/64): protobuf-c-1.3.3-12.el9.x86_64.rpm                                                                                                                                                                   39 kB/s |  40 kB     00:01
(12/64): python3-pyyaml-5.4.1-6.0.1.el9.x86_64.rpm                                                                                                                                                           5.1 MB/s | 258 kB     00:00
(13/64): libnsl-2.34-40.0.1.el9.x86_64.rpm                                                                                                                                                                    49 kB/s |  69 kB     00:01
(14/64): python3-setools-4.4.0-5.el9.x86_64.rpm                                                                                                                                                               11 MB/s | 795 kB     00:00
(15/64): initscripts-10.11.5-1.el9.x86_64.rpm                                                                                                                                                                122 kB/s | 287 kB     00:02
(16/64): quota-4.06-6.el9.x86_64.rpm                                                                                                                                                                         153 kB/s | 212 kB     00:01
(17/64): quota-nls-4.06-6.el9.noarch.rpm                                                                                                                                                                     104 kB/s |  84 kB     00:00
(18/64): rpcbind-1.2.6-5.el9.x86_64.rpm                                                                                                                                                                      1.8 MB/s |  69 kB     00:00
(19/64): sssd-nfs-idmap-2.7.3-4.0.1.el9_1.1.x86_64.rpm                                                                                                                                                       1.4 MB/s |  45 kB     00:00
(20/64): unzip-6.0-56.0.1.el9.x86_64.rpm                                                                                                                                                                     3.4 MB/s | 195 kB     00:00
(21/64): bind-libs-9.16.23-5.el9_1.x86_64.rpm                                                                                                                                                                 16 MB/s | 1.2 MB     00:00
(22/64): bind-license-9.16.23-5.el9_1.noarch.rpm                                                                                                                                                             403 kB/s |  13 kB     00:00
(23/64): bind-utils-9.16.23-5.el9_1.x86_64.rpm                                                                                                                                                               3.8 MB/s | 224 kB     00:00
(24/64): checkpolicy-3.4-1.el9.x86_64.rpm                                                                                                                                                                    6.5 MB/s | 355 kB     00:00
(25/64): smartmontools-7.2-6.el9.x86_64.rpm                                                                                                                                                                  560 kB/s | 578 kB     00:01
(26/64): python3-setuptools-53.0.0-10.el9.noarch.rpm                                                                                                                                                         482 kB/s | 1.3 MB     00:02
(27/64): fstrm-0.6.1-3.el9.x86_64.rpm                                                                                                                                                                         17 kB/s |  28 kB     00:01
(28/64): glibc-devel-2.34-40.0.1.el9.x86_64.rpm                                                                                                                                                               40 kB/s |  62 kB     00:01
(29/64): glibc-headers-2.34-40.0.1.el9.x86_64.rpm                                                                                                                                                            428 kB/s | 910 kB     00:02
(30/64): kernel-headers-5.14.0-162.6.1.el9_1.x86_64.rpm                                                                                                                                                      1.6 MB/s | 4.2 MB     00:02
(31/64): libICE-1.0.10-8.el9.x86_64.rpm                                                                                                                                                                       40 kB/s |  71 kB     00:01
(32/64): ksh-1.0.0~beta.1-2.0.1.el9.x86_64.rpm                                                                                                                                                               321 kB/s | 891 kB     00:02
(33/64): libX11-common-1.7.0-7.el9.noarch.rpm                                                                                                                                                                 10 MB/s | 350 kB     00:00
(34/64): libSM-1.2.3-10.el9.x86_64.rpm                                                                                                                                                                        30 kB/s |  42 kB     00:01
(35/64): libXau-1.0.9-8.el9.x86_64.rpm                                                                                                                                                                       1.6 MB/s |  36 kB     00:00
(36/64): libXcomposite-0.4.5-7.el9.x86_64.rpm                                                                                                                                                                1.3 MB/s |  29 kB     00:00
(37/64): libXext-1.3.4-8.el9.x86_64.rpm                                                                                                                                                                      1.8 MB/s |  40 kB     00:00
(38/64): libX11-1.7.0-7.el9.x86_64.rpm                                                                                                                                                                       374 kB/s | 648 kB     00:01
(39/64): libXinerama-1.1.4-10.el9.x86_64.rpm                                                                                                                                                                 703 kB/s |  15 kB     00:00
(40/64): libX11-xcb-1.7.0-7.el9.x86_64.rpm                                                                                                                                                                   6.8 kB/s |  12 kB     00:01
(41/64): libXrandr-1.5.2-8.el9.x86_64.rpm                                                                                                                                                                    1.2 MB/s |  28 kB     00:00
(42/64): libXi-1.7.10-8.el9.x86_64.rpm                                                                                                                                                                        29 kB/s |  40 kB     00:01
(43/64): libXmu-1.1.3-8.el9.x86_64.rpm                                                                                                                                                                        56 kB/s |  79 kB     00:01
(44/64): libXrender-0.9.10-16.el9.x86_64.rpm                                                                                                                                                                  17 kB/s |  28 kB     00:01
(45/64): libXt-1.2.0-6.el9.x86_64.rpm                                                                                                                                                                        112 kB/s | 180 kB     00:01
(46/64): libXtst-1.2.3-16.el9.x86_64.rpm                                                                                                                                                                      15 kB/s |  21 kB     00:01
(47/64): libXxf86dga-1.1.5-8.el9.x86_64.rpm                                                                                                                                                                   15 kB/s |  21 kB     00:01
(48/64): libXv-1.0.11-16.el9.x86_64.rpm                                                                                                                                                                       11 kB/s |  19 kB     00:01
(49/64): libXxf86vm-1.1.4-18.el9.x86_64.rpm                                                                                                                                                                   13 kB/s |  19 kB     00:01
(50/64): libdmx-1.1.4-12.el9.x86_64.rpm                                                                                                                                                                       17 kB/s |  17 kB     00:01
(51/64): libmaxminddb-1.5.2-3.el9.x86_64.rpm                                                                                                                                                                  28 kB/s |  34 kB     00:01
(52/64): libuv-1.42.0-1.el9.x86_64.rpm                                                                                                                                                                        82 kB/s | 158 kB     00:01
(53/64): libxcb-1.13.1-9.el9.x86_64.rpm                                                                                                                                                                      144 kB/s | 251 kB     00:01
(54/64): libxcrypt-devel-4.4.18-3.el9.x86_64.rpm                                                                                                                                                              26 kB/s |  42 kB     00:01
(55/64): lm_sensors-libs-3.6.0-10.el9.x86_64.rpm                                                                                                                                                              42 kB/s |  42 kB     00:00
(56/64): policycoreutils-python-utils-3.4-4.el9.noarch.rpm                                                                                                                                                   4.7 MB/s | 111 kB     00:00
(57/64): python3-audit-3.0.7-103.el9.x86_64.rpm                                                                                                                                                              3.8 MB/s |  88 kB     00:00
(58/64): python3-libsemanage-3.4-2.el9.x86_64.rpm                                                                                                                                                            1.4 MB/s |  85 kB     00:00
(59/64): python3-policycoreutils-3.4-4.el9.noarch.rpm                                                                                                                                                         39 MB/s | 2.3 MB     00:00
(60/64): pcp-conf-5.3.7-7.el9.x86_64.rpm                                                                                                                                                                      28 kB/s |  38 kB     00:01
(61/64): pcp-libs-5.3.7-7.el9.x86_64.rpm                                                                                                                                                                     316 kB/s | 612 kB     00:01
(62/64): sysstat-12.5.4-3.0.1.el9.x86_64.rpm                                                                                                                                                                 246 kB/s | 539 kB     00:02
(63/64): xorg-x11-utils-7.5-40.el9.x86_64.rpm                                                                                                                                                                 62 kB/s | 123 kB     00:01
(64/64): xorg-x11-xauth-1.1-10.el9.x86_64.rpm                                                                                                                                                                 25 kB/s |  36 kB     00:01
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                                                                                                        1.1 MB/s |  25 MB     00:22
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                                                                                                                                                                     1/1
  Installing       : binutils-gold-2.35.2-24.0.1.el9.x86_64                                                                                                                                                                             1/65
  Installing       : binutils-2.35.2-24.0.1.el9.x86_64                                                                                                                                                                                  2/65
  Running scriptlet: binutils-2.35.2-24.0.1.el9.x86_64                                                                                                                                                                                  2/65
  Installing       : libuv-1:1.42.0-1.el9.x86_64                                                                                                                                                                                        3/65
  Installing       : libXau-1.0.9-8.el9.x86_64                                                                                                                                                                                          4/65
  Installing       : libxcb-1.13.1-9.el9.x86_64                                                                                                                                                                                         5/65
  Installing       : libICE-1.0.10-8.el9.x86_64                                                                                                                                                                                         6/65
  Installing       : protobuf-c-1.3.3-12.el9.x86_64                                                                                                                                                                                     7/65
  Installing       : libnfsidmap-1:2.5.4-15.el9.x86_64                                                                                                                                                                                  8/65
  Installing       : libSM-1.2.3-10.el9.x86_64                                                                                                                                                                                          9/65
  Installing       : python3-libsemanage-3.4-2.el9.x86_64                                                                                                                                                                              10/65
  Installing       : python3-audit-3.0.7-103.el9.x86_64                                                                                                                                                                                11/65
  Installing       : pcp-conf-5.3.7-7.el9.x86_64                                                                                                                                                                                       12/65
  Installing       : pcp-libs-5.3.7-7.el9.x86_64                                                                                                                                                                                       13/65
  Installing       : lm_sensors-libs-3.6.0-10.el9.x86_64                                                                                                                                                                               14/65
  Installing       : sysstat-12.5.4-3.0.1.el9.x86_64                                                                                                                                                                                   15/65
  Running scriptlet: sysstat-12.5.4-3.0.1.el9.x86_64                                                                                                                                                                                   15/65
Created symlink /etc/systemd/system/multi-user.target.wants/sysstat.service → /usr/lib/systemd/system/sysstat.service.
Created symlink /etc/systemd/system/sysstat.service.wants/sysstat-collect.timer → /usr/lib/systemd/system/sysstat-collect.timer.
Created symlink /etc/systemd/system/sysstat.service.wants/sysstat-summary.timer → /usr/lib/systemd/system/sysstat-summary.timer.
 
  Installing       : libmaxminddb-1.5.2-3.el9.x86_64                                                                                                                                                                                   16/65
  Installing       : libX11-xcb-1.7.0-7.el9.x86_64                                                                                                                                                                                     17/65
  Installing       : libX11-common-1.7.0-7.el9.noarch                                                                                                                                                                                  18/65
  Installing       : libX11-1.7.0-7.el9.x86_64                                                                                                                                                                                         19/65
  Installing       : libXext-1.3.4-8.el9.x86_64                                                                                                                                                                                        20/65
  Installing       : libXi-1.7.10-8.el9.x86_64                                                                                                                                                                                         21/65
  Installing       : libXrender-0.9.10-16.el9.x86_64                                                                                                                                                                                   22/65
  Installing       : libXrandr-1.5.2-8.el9.x86_64                                                                                                                                                                                      23/65
  Installing       : libXtst-1.2.3-16.el9.x86_64                                                                                                                                                                                       24/65
  Installing       : libXinerama-1.1.4-10.el9.x86_64                                                                                                                                                                                   25/65
  Installing       : libXv-1.0.11-16.el9.x86_64                                                                                                                                                                                        26/65
  Installing       : libXxf86dga-1.1.5-8.el9.x86_64                                                                                                                                                                                    27/65
  Installing       : libXxf86vm-1.1.4-18.el9.x86_64                                                                                                                                                                                    28/65
  Installing       : libdmx-1.1.4-12.el9.x86_64                                                                                                                                                                                        29/65
  Installing       : libXcomposite-0.4.5-7.el9.x86_64                                                                                                                                                                                  30/65
  Installing       : xorg-x11-utils-7.5-40.el9.x86_64                                                                                                                                                                                  31/65
  Installing       : libXt-1.2.0-6.el9.x86_64                                                                                                                                                                                          32/65
  Installing       : libXmu-1.1.3-8.el9.x86_64                                                                                                                                                                                         33/65
  Installing       : xorg-x11-xauth-1:1.1-10.el9.x86_64                                                                                                                                                                                34/65
  Installing       : ksh-3:1.0.0~beta.1-2.0.1.el9.x86_64                                                                                                                                                                               35/65
  Running scriptlet: ksh-3:1.0.0~beta.1-2.0.1.el9.x86_64                                                                                                                                                                               35/65
  Installing       : kernel-headers-5.14.0-162.6.1.el9_1.x86_64                                                                                                                                                                        36/65
  Installing       : glibc-headers-2.34-40.0.1.el9.x86_64                                                                                                                                                                              37/65
  Installing       : libxcrypt-devel-4.4.18-3.el9.x86_64                                                                                                                                                                               38/65
  Installing       : glibc-devel-2.34-40.0.1.el9.x86_64                                                                                                                                                                                39/65
  Installing       : fstrm-0.6.1-3.el9.x86_64                                                                                                                                                                                          40/65
  Installing       : checkpolicy-3.4-1.el9.x86_64                                                                                                                                                                                      41/65
  Installing       : bind-license-32:9.16.23-5.el9_1.noarch                                                                                                                                                                            42/65
  Installing       : bind-libs-32:9.16.23-5.el9_1.x86_64                                                                                                                                                                               43/65
  Installing       : bind-utils-32:9.16.23-5.el9_1.x86_64                                                                                                                                                                              44/65
  Installing       : unzip-6.0-56.0.1.el9.x86_64                                                                                                                                                                                       45/65
  Installing       : smartmontools-1:7.2-6.el9.x86_64                                                                                                                                                                                  46/65
  Running scriptlet: smartmontools-1:7.2-6.el9.x86_64                                                                                                                                                                                  46/65
Created symlink /etc/systemd/system/multi-user.target.wants/smartd.service → /usr/lib/systemd/system/smartd.service.
 
  Running scriptlet: rpcbind-1.2.6-5.el9.x86_64                                                                                                                                                                                        47/65
  Installing       : rpcbind-1.2.6-5.el9.x86_64                                                                                                                                                                                        47/65
  Running scriptlet: rpcbind-1.2.6-5.el9.x86_64                                                                                                                                                                                        47/65
Created symlink /etc/systemd/system/multi-user.target.wants/rpcbind.service → /usr/lib/systemd/system/rpcbind.service.
Created symlink /etc/systemd/system/sockets.target.wants/rpcbind.socket → /usr/lib/systemd/system/rpcbind.socket.
 
  Installing       : quota-nls-1:4.06-6.el9.noarch                                                                                                                                                                                     48/65
  Installing       : quota-1:4.06-6.el9.x86_64                                                                                                                                                                                         49/65
  Installing       : python3-setuptools-53.0.0-10.el9.noarch                                                                                                                                                                           50/65
  Installing       : python3-setools-4.4.0-5.el9.x86_64                                                                                                                                                                                51/65
  Installing       : python3-policycoreutils-3.4-4.el9.noarch                                                                                                                                                                          52/65
  Installing       : policycoreutils-python-utils-3.4-4.el9.noarch                                                                                                                                                                     53/65
  Installing       : python3-pyyaml-5.4.1-6.0.1.el9.x86_64                                                                                                                                                                             54/65
  Installing       : net-tools-2.0-0.62.20160912git.el9.x86_64                                                                                                                                                                         55/65
  Running scriptlet: net-tools-2.0-0.62.20160912git.el9.x86_64                                                                                                                                                                         55/65
  Installing       : libnsl-2.34-40.0.1.el9.x86_64                                                                                                                                                                                     56/65
  Installing       : libev-4.33-5.el9.x86_64                                                                                                                                                                                           57/65
  Installing       : libverto-libev-0.3.2-3.el9.x86_64                                                                                                                                                                                 58/65
  Installing       : gssproxy-0.8.4-4.el9.x86_64                                                                                                                                                                                       59/65
  Running scriptlet: gssproxy-0.8.4-4.el9.x86_64                                                                                                                                                                                       59/65
  Installing       : keyutils-1.6.1-4.el9.x86_64                                                                                                                                                                                       60/65
  Running scriptlet: nfs-utils-1:2.5.4-15.el9.x86_64                                                                                                                                                                                   61/65
  Installing       : nfs-utils-1:2.5.4-15.el9.x86_64                                                                                                                                                                                   61/65
  Running scriptlet: nfs-utils-1:2.5.4-15.el9.x86_64                                                                                                                                                                                   61/65
  Installing       : initscripts-10.11.5-1.el9.x86_64                                                                                                                                                                                  62/65
  Running scriptlet: initscripts-10.11.5-1.el9.x86_64                                                                                                                                                                                  62/65
Created symlink /etc/systemd/system/sysinit.target.wants/import-state.service → /usr/lib/systemd/system/import-state.service.
Created symlink /etc/systemd/system/sysinit.target.wants/loadmodules.service → /usr/lib/systemd/system/loadmodules.service.
 
  Installing       : bc-1.07.1-14.el9.x86_64                                                                                                                                                                                           63/65
  Installing       : oracle-database-preinstall-21c-1.0-1.el8.x86_64                                                                                                                                                                   64/65
  Installing       : sssd-nfs-idmap-2.7.3-4.0.1.el9_1.1.x86_64                                                                                                                                                                         65/65
  Running scriptlet: oracle-database-preinstall-21c-1.0-1.el8.x86_64                                                                                                                                                                   65/65
  Running scriptlet: sssd-nfs-idmap-2.7.3-4.0.1.el9_1.1.x86_64                                                                                                                                                                         65/65
  Verifying        : bc-1.07.1-14.el9.x86_64                                                                                                                                                                                            1/65
  Verifying        : binutils-2.35.2-24.0.1.el9.x86_64                                                                                                                                                                                  2/65
  Verifying        : binutils-gold-2.35.2-24.0.1.el9.x86_64                                                                                                                                                                             3/65
  Verifying        : gssproxy-0.8.4-4.el9.x86_64                                                                                                                                                                                        4/65
  Verifying        : initscripts-10.11.5-1.el9.x86_64                                                                                                                                                                                   5/65
  Verifying        : keyutils-1.6.1-4.el9.x86_64                                                                                                                                                                                        6/65
  Verifying        : libev-4.33-5.el9.x86_64                                                                                                                                                                                            7/65
  Verifying        : libnfsidmap-1:2.5.4-15.el9.x86_64                                                                                                                                                                                  8/65
  Verifying        : libnsl-2.34-40.0.1.el9.x86_64                                                                                                                                                                                      9/65
  Verifying        : libverto-libev-0.3.2-3.el9.x86_64                                                                                                                                                                                 10/65
  Verifying        : net-tools-2.0-0.62.20160912git.el9.x86_64                                                                                                                                                                         11/65
  Verifying        : nfs-utils-1:2.5.4-15.el9.x86_64                                                                                                                                                                                   12/65
  Verifying        : protobuf-c-1.3.3-12.el9.x86_64                                                                                                                                                                                    13/65
  Verifying        : python3-pyyaml-5.4.1-6.0.1.el9.x86_64                                                                                                                                                                             14/65
  Verifying        : python3-setools-4.4.0-5.el9.x86_64                                                                                                                                                                                15/65
  Verifying        : python3-setuptools-53.0.0-10.el9.noarch                                                                                                                                                                           16/65
  Verifying        : quota-1:4.06-6.el9.x86_64                                                                                                                                                                                         17/65
  Verifying        : quota-nls-1:4.06-6.el9.noarch                                                                                                                                                                                     18/65
  Verifying        : rpcbind-1.2.6-5.el9.x86_64                                                                                                                                                                                        19/65
  Verifying        : smartmontools-1:7.2-6.el9.x86_64                                                                                                                                                                                  20/65
  Verifying        : sssd-nfs-idmap-2.7.3-4.0.1.el9_1.1.x86_64                                                                                                                                                                         21/65
  Verifying        : unzip-6.0-56.0.1.el9.x86_64                                                                                                                                                                                       22/65
  Verifying        : bind-libs-32:9.16.23-5.el9_1.x86_64                                                                                                                                                                               23/65
  Verifying        : bind-license-32:9.16.23-5.el9_1.noarch                                                                                                                                                                            24/65
  Verifying        : bind-utils-32:9.16.23-5.el9_1.x86_64                                                                                                                                                                              25/65
  Verifying        : checkpolicy-3.4-1.el9.x86_64                                                                                                                                                                                      26/65
  Verifying        : fstrm-0.6.1-3.el9.x86_64                                                                                                                                                                                          27/65
  Verifying        : glibc-devel-2.34-40.0.1.el9.x86_64                                                                                                                                                                                28/65
  Verifying        : glibc-headers-2.34-40.0.1.el9.x86_64                                                                                                                                                                              29/65
  Verifying        : kernel-headers-5.14.0-162.6.1.el9_1.x86_64                                                                                                                                                                        30/65
  Verifying        : ksh-3:1.0.0~beta.1-2.0.1.el9.x86_64                                                                                                                                                                               31/65
  Verifying        : libICE-1.0.10-8.el9.x86_64                                                                                                                                                                                        32/65
  Verifying        : libSM-1.2.3-10.el9.x86_64                                                                                                                                                                                         33/65
  Verifying        : libX11-1.7.0-7.el9.x86_64                                                                                                                                                                                         34/65
  Verifying        : libX11-common-1.7.0-7.el9.noarch                                                                                                                                                                                  35/65
  Verifying        : libX11-xcb-1.7.0-7.el9.x86_64                                                                                                                                                                                     36/65
  Verifying        : libXau-1.0.9-8.el9.x86_64                                                                                                                                                                                         37/65
  Verifying        : libXcomposite-0.4.5-7.el9.x86_64                                                                                                                                                                                  38/65
  Verifying        : libXext-1.3.4-8.el9.x86_64                                                                                                                                                                                        39/65
  Verifying        : libXi-1.7.10-8.el9.x86_64                                                                                                                                                                                         40/65
  Verifying        : libXinerama-1.1.4-10.el9.x86_64                                                                                                                                                                                   41/65
  Verifying        : libXmu-1.1.3-8.el9.x86_64                                                                                                                                                                                         42/65
  Verifying        : libXrandr-1.5.2-8.el9.x86_64                                                                                                                                                                                      43/65
  Verifying        : libXrender-0.9.10-16.el9.x86_64                                                                                                                                                                                   44/65
  Verifying        : libXt-1.2.0-6.el9.x86_64                                                                                                                                                                                          45/65
  Verifying        : libXtst-1.2.3-16.el9.x86_64                                                                                                                                                                                       46/65
  Verifying        : libXv-1.0.11-16.el9.x86_64                                                                                                                                                                                        47/65
  Verifying        : libXxf86dga-1.1.5-8.el9.x86_64                                                                                                                                                                                    48/65
  Verifying        : libXxf86vm-1.1.4-18.el9.x86_64                                                                                                                                                                                    49/65
  Verifying        : libdmx-1.1.4-12.el9.x86_64                                                                                                                                                                                        50/65
  Verifying        : libmaxminddb-1.5.2-3.el9.x86_64                                                                                                                                                                                   51/65
  Verifying        : libuv-1:1.42.0-1.el9.x86_64                                                                                                                                                                                       52/65
  Verifying        : libxcb-1.13.1-9.el9.x86_64                                                                                                                                                                                        53/65
  Verifying        : libxcrypt-devel-4.4.18-3.el9.x86_64                                                                                                                                                                               54/65
  Verifying        : lm_sensors-libs-3.6.0-10.el9.x86_64                                                                                                                                                                               55/65
  Verifying        : pcp-conf-5.3.7-7.el9.x86_64                                                                                                                                                                                       56/65
  Verifying        : pcp-libs-5.3.7-7.el9.x86_64                                                                                                                                                                                       57/65
  Verifying        : policycoreutils-python-utils-3.4-4.el9.noarch                                                                                                                                                                     58/65
  Verifying        : python3-audit-3.0.7-103.el9.x86_64                                                                                                                                                                                59/65
  Verifying        : python3-libsemanage-3.4-2.el9.x86_64                                                                                                                                                                              60/65
  Verifying        : python3-policycoreutils-3.4-4.el9.noarch                                                                                                                                                                          61/65
  Verifying        : sysstat-12.5.4-3.0.1.el9.x86_64                                                                                                                                                                                   62/65
  Verifying        : xorg-x11-utils-7.5-40.el9.x86_64                                                                                                                                                                                  63/65
  Verifying        : xorg-x11-xauth-1:1.1-10.el9.x86_64                                                                                                                                                                                64/65
  Verifying        : oracle-database-preinstall-21c-1.0-1.el8.x86_64                                                                                                                                                                   65/65
 
Installed:
  bc-1.07.1-14.el9.x86_64                              bind-libs-32:9.16.23-5.el9_1.x86_64       bind-license-32:9.16.23-5.el9_1.noarch          bind-utils-32:9.16.23-5.el9_1.x86_64               binutils-2.35.2-24.0.1.el9.x86_64
  binutils-gold-2.35.2-24.0.1.el9.x86_64               checkpolicy-3.4-1.el9.x86_64              fstrm-0.6.1-3.el9.x86_64                        glibc-devel-2.34-40.0.1.el9.x86_64                 glibc-headers-2.34-40.0.1.el9.x86_64
  gssproxy-0.8.4-4.el9.x86_64                          initscripts-10.11.5-1.el9.x86_64          kernel-headers-5.14.0-162.6.1.el9_1.x86_64      keyutils-1.6.1-4.el9.x86_64                        ksh-3:1.0.0~beta.1-2.0.1.el9.x86_64
  libICE-1.0.10-8.el9.x86_64                           libSM-1.2.3-10.el9.x86_64                 libX11-1.7.0-7.el9.x86_64                       libX11-common-1.7.0-7.el9.noarch                   libX11-xcb-1.7.0-7.el9.x86_64
  libXau-1.0.9-8.el9.x86_64                            libXcomposite-0.4.5-7.el9.x86_64          libXext-1.3.4-8.el9.x86_64                      libXi-1.7.10-8.el9.x86_64                          libXinerama-1.1.4-10.el9.x86_64
  libXmu-1.1.3-8.el9.x86_64                            libXrandr-1.5.2-8.el9.x86_64              libXrender-0.9.10-16.el9.x86_64                 libXt-1.2.0-6.el9.x86_64                           libXtst-1.2.3-16.el9.x86_64
  libXv-1.0.11-16.el9.x86_64                           libXxf86dga-1.1.5-8.el9.x86_64            libXxf86vm-1.1.4-18.el9.x86_64                  libdmx-1.1.4-12.el9.x86_64                         libev-4.33-5.el9.x86_64
  libmaxminddb-1.5.2-3.el9.x86_64                      libnfsidmap-1:2.5.4-15.el9.x86_64         libnsl-2.34-40.0.1.el9.x86_64                   libuv-1:1.42.0-1.el9.x86_64                        libverto-libev-0.3.2-3.el9.x86_64
  libxcb-1.13.1-9.el9.x86_64                           libxcrypt-devel-4.4.18-3.el9.x86_64       lm_sensors-libs-3.6.0-10.el9.x86_64             net-tools-2.0-0.62.20160912git.el9.x86_64          nfs-utils-1:2.5.4-15.el9.x86_64
  oracle-database-preinstall-21c-1.0-1.el8.x86_64      pcp-conf-5.3.7-7.el9.x86_64               pcp-libs-5.3.7-7.el9.x86_64                     policycoreutils-python-utils-3.4-4.el9.noarch      protobuf-c-1.3.3-12.el9.x86_64
  python3-audit-3.0.7-103.el9.x86_64                   python3-libsemanage-3.4-2.el9.x86_64      python3-policycoreutils-3.4-4.el9.noarch        python3-pyyaml-5.4.1-6.0.1.el9.x86_64              python3-setools-4.4.0-5.el9.x86_64
  python3-setuptools-53.0.0-10.el9.noarch              quota-1:4.06-6.el9.x86_64                 quota-nls-1:4.06-6.el9.noarch                   rpcbind-1.2.6-5.el9.x86_64                         smartmontools-1:7.2-6.el9.x86_64
  sssd-nfs-idmap-2.7.3-4.0.1.el9_1.1.x86_64            sysstat-12.5.4-3.0.1.el9.x86_64           unzip-6.0-56.0.1.el9.x86_64                     xorg-x11-utils-7.5-40.el9.x86_64                   xorg-x11-xauth-1:1.1-10.el9.x86_64
 
Complete!

Install Database XE RPM

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

Hope this is useful. , Have a good day.

Posted in oracle, Oracle Administration, Oracle Database 21c, Oracle Server Administration, Oracle XE | Tagged: , , , , , , , | Leave a Comment »

Sample Script to Publish a blog Post #Python

Posted by Sriram Sanka on March 29, 2023


Sample Script to Publish a blog Post Using Python

This post is Auto published using Python script attached below. #Python

import json
from wordpress_xmlrpc import Client, WordPressPost
from wordpress_xmlrpc.methods.posts import NewPost
import getpass
password = getpass.getpass(prompt='Password: ', stream=None)  //Blog Login Password 
def auto_blog_post(blog_content,blog_excerpt,blog_status):
    id = 'sriramoracle'   //User Name
    url = 'https://sriramoracle.wordpress.com/xmlrpc.php'
    wp = Client(url, id, password)
    post = WordPressPost()
    post.post_status = blog_status
    post.title = blog_excerpt
    post.content = blog_content
    post.excerpt = blog_excerpt
    post.terms_names = {
        "post_tag": ['Python'],
        "category": ['Python']
    }
    wp.call(NewPost(post))
auto_blog_post('Sample Script to Publish a blog Post Using Python ','Sample Script to Publish a blog Post ' ,'publish')  //publish will publish the Post, Draft is the default mode. 

Posted in Python | Tagged: | Leave a Comment »

Python way to Download all the ASKTOM and Oracle MAG Posted by Connor McDonald at Linked In Group

Posted by Sriram Sanka on November 8, 2022


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 .

Snippet To Download TOM KYTE Posts

import requests
from bs4 import BeautifulSoup
import string
import os
import urllib.request, urllib.error, urllib.parse
import sys

def Download_ASKTOM_files(path,url,enc,title):
    try:                
        response = urllib.request.urlopen(url)
        webContent = response.read().decode(enc)
        os.makedirs(path+'\\'+ 'ASKTOM', exist_ok=True)
        n=os.path.join(path+'\\'+ 'ASKTOM',title +'.html')
        f = open(n, 'w',encoding=enc)
        f.write(webContent)
        f.close
    except:
        n1=os.path.join(path+'\\'+  'ASKTOM_'+'Download_Error.log')
        f1 = open(n1, 'w',encoding=enc) 
        f1.write(url)
        f1.close
reqs = requests.get("https://asktom.oracle.com/tomkyte-blog.htm")
soup = BeautifulSoup(reqs.text, 'html.parser')
for link2 in soup.select(" a[href]"):
    src=link2["href"]
    durl='https://asktom.oracle.com/'+src
    tit =link2.get_text().replace(string.punctuation, " ").translate(str.maketrans('', '', string.punctuation))
    print(tit.replace(" ","_"),durl)
    Download_ASKTOM_files("c:\\Users\\....\\Downloads\\blogs\\",durl,'UTF-8',tit.replace(" ","_"))        

Snippet to Download Magazines

import requests
from bs4 import BeautifulSoup
import string
import os
import urllib.request, urllib.error, urllib.parse
import sys

def Download_ASKTOM_files(path,url,enc,title):
    try:                
        response = urllib.request.urlopen(url)
        webContent = response.read().decode(enc)
        os.makedirs(path+'\\'+ 'ASKTOM_MAG', exist_ok=True)
        n=os.path.join(path+'\\'+ 'ASKTOM_MAG',title +'.html')
        f = open(n, 'w',encoding=enc)
        f.write(webContent)
        f.close
    except:
        n1=os.path.join(path+'\\'+  'ASKTOM_MAG_'+'Download_Error.log')
        f1 = open(n1, 'w',encoding=enc) 
        f1.write(url)
        f1.close
reqs = requests.get("https://asktom.oracle.com/magazine-archive.htm")
soup = BeautifulSoup(reqs.text, 'html.parser')
for link2 in soup.select(" a[href]"):
    src=link2["href"]
    durl='https://asktom.oracle.com/'+src
    tit =link2.get_text().replace(string.punctuation, " ").translate(str.maketrans('', '', string.punctuation))
    print(tit.replace(" ","_"),durl)
    Download_ASKTOM_files("c:\\Users\\......\\Downloads\\blogs\\",durl,'UTF-8',tit.replace(" ","_"))   

Hope you liked it 🙂

Posted in ASKTOM, CONNOR, Python, TOMKYTE | Tagged: , , , , | Leave a Comment »

Ubuntu (Focal Fossa) OS Upgrade V18.04.6 LTS – V20.04.5 LTS

Posted by Sriram Sanka on November 1, 2022


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.

You can download OS VM Images from either https://www.linuxvmimages.com/ Or https://www.osboxes.org/virtualbox-images/

Ubuntu Can be Upgraded to the Latest using 3 simple steps.

  1. Update – get all the Package Updates.
  2. Upgrade – Package Upgrades to the Latest.
  3. 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:~#

Posted in Ubuntu, Upgrade | Tagged: , | Leave a Comment »

MySQL – Install(5.7) and Upgrade to (8.0.31) in Ubuntu 18.*

Posted by Sriram Sanka on October 31, 2022


#MySQL #Ubuntu 18.04.6 #Install # Upgrade

You can download OS VM Images from either https://www.linuxvmimages.com/ Or https://www.osboxes.org/virtualbox-images/

Installing MySQL in Ubuntu OS is very easy, you just need to follow 3 steps.

Update, Install MySQL CE Server and Configure.

Step 1:

Make sure to get all the updated Package Information before Installing MySQL.

root@osboxes:~# apt update
Hit:1 http://us.archive.ubuntu.com/ubuntu bionic InRelease
Get:2 http://us.archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB]
Get:3 http://security.ubuntu.com/ubuntu bionic-security InRelease [88.7 kB]
Get:4 http://us.archive.ubuntu.com/ubuntu bionic-backports InRelease [83.3 kB]
Get:5 http://us.archive.ubuntu.com/ubuntu bionic-updates/main amd64 Packages [2,786 kB]
Get:6 http://us.archive.ubuntu.com/ubuntu bionic-updates/main i386 Packages [1,558 kB]
Get:7 http://us.archive.ubuntu.com/ubuntu bionic-updates/main amd64 DEP-11 Metadata [297 kB]
Get:8 http://us.archive.ubuntu.com/ubuntu bionic-updates/universe amd64 DEP-11 Metadata [301 kB]
Get:9 http://us.archive.ubuntu.com/ubuntu bionic-updates/multiverse amd64 DEP-11 Metadata [2,468 B]
Get:10 http://us.archive.ubuntu.com/ubuntu bionic-backports/main amd64 DEP-11 Metadata [8,132 B]
Get:11 http://us.archive.ubuntu.com/ubuntu bionic-backports/universe amd64 DEP-11 Metadata [10.0 kB]
Get:12 http://security.ubuntu.com/ubuntu bionic-security/main amd64 DEP-11 Metadata [55.2 kB]
Get:13 http://security.ubuntu.com/ubuntu bionic-security/universe amd64 DEP-11 Metadata [61.0 kB]
Get:14 http://security.ubuntu.com/ubuntu bionic-security/multiverse amd64 DEP-11 Metadata [2,464 B]
Fetched 5,343 kB in 1min 22s (64.9 kB/s)


Reading package lists... Done
Building dependency tree
Reading state information... Done
259 packages can be upgraded. Run 'apt list --upgradable' to see them.
root@osboxes:~#
root@osboxes:~#

Step 2:

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.

root@osboxes:~# apt-get update
Get:1 http://security.ubuntu.com/ubuntu bionic-security InRelease [88.7 kB]
Hit:2 http://us.archive.ubuntu.com/ubuntu bionic InRelease
Get:3 http://us.archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB]
Get:4 http://us.archive.ubuntu.com/ubuntu bionic-backports InRelease [83.3 kB]
Get:5 http://security.ubuntu.com/ubuntu bionic-security/main amd64 DEP-11 Metadata [55.2 kB]
Get:6 http://security.ubuntu.com/ubuntu bionic-security/universe amd64 DEP-11 Metadata [61.0 kB]
Get:7 http://security.ubuntu.com/ubuntu bionic-security/multiverse amd64 DEP-11 Metadata [2,464 B]
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://us.archive.ubuntu.com/ubuntu bionic-backports/main amd64 DEP-11 Metadata [8,076 B]
Get:12 http://us.archive.ubuntu.com/ubuntu bionic-backports/universe amd64 DEP-11 Metadata [10.0 kB]
Fetched 999 kB in 40s (24.8 kB/s)
Reading package lists... Done
root@osboxes:~# apt-get upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following packages have been kept back:
  linux-generic-hwe-18.04 linux-headers-generic-hwe-18.04 linux-image-generic-hwe-18.04
The following packages will be upgraded:
  apport apport-gtk bash bind9-host binutils binutils-common binutils-x86-64-linux-gnu bluez bluez-cups bluez-obexd busybox-initramfs busybox-static ca-certificates command-not-found command-not-found-data cron cups cups-bsd
  cups-client cups-common cups-core-drivers cups-daemon cups-ipp-utils cups-ppdc cups-server-common dbus dbus-user-session dbus-x11 deja-dup dirmngr distro-info-data dnsmasq-base dnsutils dpkg e2fsprogs firefox firefox-locale-en
  fonts-opensymbol ghostscript ghostscript-x gir1.2-javascriptcoregtk-4.0 gir1.2-notify-0.7 gir1.2-polkit-1.0 gir1.2-webkit2-4.0 gnupg gnupg-l10n gnupg-utils gpg gpg-agent gpg-wks-client gpg-wks-server gpgconf gpgsm gpgv
  gstreamer1.0-gtk3 gstreamer1.0-plugins-good gstreamer1.0-pulseaudio gzip imagemagick imagemagick-6-common imagemagick-6.q16 intel-microcode isc-dhcp-client isc-dhcp-common klibc-utils libasn1-8-heimdal libbind9-160 libbinutils
  libbluetooth3 libc-bin libc6 libc6-dbg libcaca0 libcom-err2 libcups2 libcupscgi1 libcupsimage2 libcupsmime1 libcupsppdc1 libcurl3-gnutls libdbus-1-3 libdns-export1100 libdns1100 libdpkg-perl libevdev2 libexempi3 libexpat1 libext2fs2
  libfreerdp-client2-2 libfreerdp2-2 libfreetype6 libfribidi0 libgcrypt20 libglib2.0-0 libglib2.0-bin libglib2.0-data libgmp10 libgnutls30 libgs9 libgs9-common libgssapi3-heimdal libgstreamer-plugins-good1.0-0 libhcrypto4-heimdal
  libheimbase1-heimdal libheimntlm0-heimdal libhttp-daemon-perl libhx509-5-heimdal libicu60 libinput-bin libinput10 libirs160 libisc-export169 libisc169 libisccc160 libisccfg160 libjavascriptcoregtk-4.0-18 libjpeg-turbo8 libkeyutils1
  libklibc libkrb5-26-heimdal libksba8 libldap-2.4-2 libldap-common liblouis-data liblouis14 liblwres160 liblzma5 libmagickcore-6.q16-3 libmagickcore-6.q16-3-extra libmagickwand-6.q16-3 libnetplan0 libnotify-bin libnotify4
  libnss-myhostname libnss-systemd libnss3 libntfs-3g88 libopenexr22 libpam-systemd libpcre3 libperl5.26 libpolkit-agent-1-0 libpolkit-backend-1-0 libpolkit-gobject-1-0 libpoppler-glib8 libpoppler73 libpython2.7 libpython2.7-minimal
  libpython2.7-stdlib libpython3.6 libpython3.6-minimal libpython3.6-stdlib libreoffice-avmedia-backend-gstreamer libreoffice-base-core libreoffice-calc libreoffice-common libreoffice-core libreoffice-draw libreoffice-gnome
  libreoffice-gtk3 libreoffice-impress libreoffice-math libreoffice-ogltrans libreoffice-pdfimport libreoffice-style-breeze libreoffice-style-galaxy libreoffice-style-tango libreoffice-writer libroken18-heimdal libsasl2-2
  libsasl2-modules libsasl2-modules-db libseccomp2 libsensors4 libsepol1 libsmbclient libsnmp-base libsnmp30 libspeex1 libspeexdsp1 libsqlite3-0 libss2 libssl1.0.0 libssl1.1 libsystemd0 libtiff5 libudev1 libwayland-client0
  libwayland-cursor0 libwayland-egl1 libwayland-server0 libwbclient0 libwebkit2gtk-4.0-37 libwind0-heimdal libwinpr2-2 libxml2 libxslt1.1 linux-base linux-firmware locales login multiarch-support netplan.io networkd-dispatcher nplan
  ntfs-3g open-vm-tools open-vm-tools-desktop openssl passwd perl perl-base perl-modules-5.26 policykit-1 poppler-utils python3-apport python3-commandnotfound python3-louis python3-mako python3-pil python3-problem-report
  python3-software-properties python3-uno python3.6 python3.6-minimal rsync rsyslog samba-libs sbsigntool snapd software-properties-common software-properties-gtk systemd systemd-sysv tar tcpdump thunderbird thunderbird-gnome-support
  thunderbird-locale-en thunderbird-locale-en-us tzdata ubuntu-advantage-tools udev ufw uno-libs3 unzip ure wireless-regdb xserver-common xserver-xephyr xserver-xorg-core-hwe-18.04 xserver-xorg-legacy-hwe-18.04 xwayland xxd xz-utils
  zlib1g
256 upgraded, 0 newly installed, 0 to remove and 3 not upgraded.
225 standard security updates
Need to get 439 MB of archives.
After this operation, 101 MB of additional disk space will be used.
Do you want to continue? [Y/n] y

...................
....................
....................
Updating certificates in /etc/ssl/certs...
0 added, 0 removed; done.
Running hooks in /etc/ca-certificates/update.d...
done.
root@osboxes:~#

Download the latest MySQL APT Repository from https://dev.mysql.com/downloads/repo/apt/

root@osboxes:~# wget https://dev.mysql.com/get/mysql-apt-config_0.8.24-1_all.deb
--2022-10-30 12:52:21--  https://dev.mysql.com/get/mysql-apt-config_0.8.24-1_all.deb
Resolving dev.mysql.com (dev.mysql.com)... 2600:140f:400:19a::2e31, 2600:140f:400:1b2::2e31, 23.214.233.36
Connecting to dev.mysql.com (dev.mysql.com)|2600:140f:400:19a::2e31|:443... connected.
HTTP request sent, awaiting response... 302 Moved Temporarily
Location: https://repo.mysql.com//mysql-apt-config_0.8.24-1_all.deb [following]
--2022-10-30 12:52:22--  https://repo.mysql.com//mysql-apt-config_0.8.24-1_all.deb
Resolving repo.mysql.com (repo.mysql.com)... 49.44.146.86
Connecting to repo.mysql.com (repo.mysql.com)|49.44.146.86|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 18048 (18K) [application/x-debian-package]
Saving to: ‘mysql-apt-config_0.8.24-1_all.deb’

mysql-apt-config_0.8.24-1_all.deb                           100%[========================================================================================================================================>]  17.62K  --.-KB/s    in 0s

2022-10-30 12:52:25 (101 MB/s) - ‘mysql-apt-config_0.8.24-1_all.deb’ saved [18048/18048]

Now Install the Downloaded APT Repo and update .

root@osboxes:~# dpkg -i mysql-apt-config_0.8.24-1_all.deb
Selecting previously unselected package mysql-apt-config.
(Reading database ... 132603 files and directories currently installed.)
Preparing to unpack mysql-apt-config_0.8.24-1_all.deb ...
Unpacking mysql-apt-config (0.8.24-1) ...
Setting up mysql-apt-config (0.8.24-1) ...
Warning: apt-key should not be used in scripts (called from postinst maintainerscript of the package mysql-apt-config)
OK
root@osboxes:~# apt-get update
Get:1 http://security.ubuntu.com/ubuntu bionic-security InRelease [88.7 kB]
Get:2 http://repo.mysql.com/apt/ubuntu bionic InRelease [20.0 kB]
Hit:3 http://us.archive.ubuntu.com/ubuntu bionic InRelease
Get:4 http://us.archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB]
Get:5 http://us.archive.ubuntu.com/ubuntu bionic-backports InRelease [83.3 kB]
Get:6 http://repo.mysql.com/apt/ubuntu bionic/mysql-8.0 Sources [973 B]
Get:7 http://repo.mysql.com/apt/ubuntu bionic/mysql-apt-config i386 Packages [567 B]
Get:8 http://repo.mysql.com/apt/ubuntu bionic/mysql-apt-config amd64 Packages [567 B]
Get:9 http://repo.mysql.com/apt/ubuntu bionic/mysql-8.0 i386 Packages [8,533 B]
Get:10 http://repo.mysql.com/apt/ubuntu bionic/mysql-8.0 amd64 Packages [8,528 B]
Get:11 http://repo.mysql.com/apt/ubuntu bionic/mysql-tools amd64 Packages [8,196 B]
Get:12 http://repo.mysql.com/apt/ubuntu bionic/mysql-tools i386 Packages [8,200 B]
Get:13 http://security.ubuntu.com/ubuntu bionic-security/main amd64 DEP-11 Metadata [55.2 kB]
Get:14 http://security.ubuntu.com/ubuntu bionic-security/universe amd64 DEP-11 Metadata [61.1 kB]
Get:15 http://security.ubuntu.com/ubuntu bionic-security/multiverse amd64 DEP-11 Metadata [2,464 B]
Get:16 http://us.archive.ubuntu.com/ubuntu bionic-updates/main amd64 Packages [2,803 kB]
Get:17 http://us.archive.ubuntu.com/ubuntu bionic-updates/main i386 Packages [1,558 kB]
Get:18 http://us.archive.ubuntu.com/ubuntu bionic-updates/main amd64 DEP-11 Metadata [296 kB]
Get:19 http://us.archive.ubuntu.com/ubuntu bionic-updates/universe amd64 DEP-11 Metadata [302 kB]
Get:20 http://us.archive.ubuntu.com/ubuntu bionic-updates/multiverse amd64 DEP-11 Metadata [2,468 B]
Get:21 http://us.archive.ubuntu.com/ubuntu bionic-backports/main amd64 DEP-11 Metadata [8,132 B]
Get:22 http://us.archive.ubuntu.com/ubuntu bionic-backports/universe amd64 DEP-11 Metadata [10.0 kB]
Fetched 5,415 kB in 1min 9s (78.5 kB/s)
Reading package lists... Done

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:~#

Hope this is helpful. Have a good day.

-Sriram Sanka

Reference Links

https://dev.mysql.com/doc/mysql-apt-repo-quick-guide/en/#apt-repo-fresh-install

https://dev.mysql.com/downloads/repo/apt/

https://dev.mysql.com/doc/refman/5.7/en/updating-apt-repo.html

https://dev.mysql.com/doc/mysql-shell/8.0/en/mysql-shell-utilities-upgrade.html

https://dev.mysql.com/doc/mysql-apt-repo-quick-guide/en/#repo-qg-apt-upgrading

https://dev.mysql.com/doc/mysql-apt-repo-quick-guide/en/#repo-qg-apt-repo-manual-setup

https://dev.mysql.com/doc/refman/8.0/en/upgrading.html

https://dev.mysql.com/doc/refman/8.0/en/upgrade-before-you-begin.html

https://dev.mysql.com/doc/refman/8.0/en/upgrading-what-is-upgraded.html

https://dev.mysql.com/doc/refman/8.0/en/upgrade-prerequisites.html

Posted in Installation, Linux, MySql, oracle, Ubuntu, Upgrade 5.7 to 8, VM Images | Tagged: , , , , , , | Leave a Comment »

Web-Scraping 🐍 – Part 2 – Download scripts from code.activestate.com with Python -Pagination

Posted by Sriram Sanka on October 22, 2022


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.

Lets Invoke the URL https://code.activestate.com/recipes/langs/python/ in the browser & Jupiter to get the source of the webpage.

We have around 4500+ Scripts from 230 Pages, when you navigate through Pages you can see the URL gets appended with Page id as “/?page=1” at the end.

import requests
from bs4 import BeautifulSoup
import string
url = 'https://code.activestate.com/recipes/langs/python/?page=1'
reqs = requests.get(url)<br>soup = BeautifulSoup(reqs.text, 'html.parser')
print(soup)

If you are not sure how to generate Python Sample Code ,Try with postman as below to get the code Snippet.

You can see the Pattern in the Output.

Take a look at the first link , It reads as https://code.activestate.com/recipes/580811-uno-text-based/?in=lang-python and the Download link reads as https://code.activestate.com/recipes/580811-uno-text-based/download/1/

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.

Hope you like it. 🙂

Posted in POSTMAN, Python, WebScraping | Leave a Comment »

How-to-Install-Python-with-Anaconda & Connect with Oracle

Posted by Sriram Sanka on October 4, 2022


You can also download Python Installer Executable from https://www.python.org/downloads/windows/

With the Help of CX_ORACLE, we can connect and Execute Oracle Commands .

<strong>import pandas as pd
import pandas.io.sql as psql
import cx_Oracle
import os
os.environ["NLS_LANG"] = "AMERICAN_AMERICA.AL32UTF8"

dsn_tns = cx_Oracle.makedsn('localhost', 1521, 'xe')
ora_conn = cx_Oracle.connect('sriram','sriram',dsn=dsn_tns)
df1 = psql.read_sql('SELECT * FROM dba_users ', con=ora_conn) 
#for v in df1['USERNAME']:
#    print(v)
print("Running :", df1)
ora_conn.close()</strong>

You can use getpass to hide prompted password at command prompt.

<strong>import pandas as pd
import pandas.io.sql as psql
import cx_Oracle
import getpass
import os
os.environ["NLS_LANG"] = "AMERICAN_AMERICA.AL32UTF8"
username = input("Enter User Name: ")
userpwd = getpass.getpass(prompt='Password: ', stream=None) 

dsn_tns = cx_Oracle.makedsn('localhost', 1521, 'xe')
ora_conn = cx_Oracle.connect(username,userpwd,dsn=dsn_tns)
df1 = psql.read_sql('SELECT username,account_status FROM dba_users ', con=ora_conn) 
print("Running :", df1)
ora_conn.close()
</strong>

We can use the plot by Installing matplotlib

<strong>import pandas as pd
import pandas.io.sql as psql
import cx_Oracle
import getpass
import os
import matplotlib.pyplot as plt
os.environ["NLS_LANG"] = "AMERICAN_AMERICA.AL32UTF8"
username = input("Enter User Name: ")
userpwd = getpass.getpass(prompt='Password: ', stream=None) 

dsn_tns = cx_Oracle.makedsn('localhost', 1521, 'xe')
ora_conn = cx_Oracle.connect(username,userpwd,dsn=dsn_tns)
df1 = psql.read_sql('SELECT count(*) cnt,account_status FROM dba_users group by account_status', con=ora_conn) 

print(df1)
df1.plot(x="ACCOUNT_STATUS",y=["CNT"])
plt.show()
ora_conn.close()</strong>

<strong>import pandas as pd
import pandas.io.sql as psql
import cx_Oracle
import getpass
import os
import matplotlib.pyplot as plt

os.environ["NLS_LANG"] = "AMERICAN_AMERICA.AL32UTF8"
username = input("Enter User Name: ")
userpwd = getpass.getpass(prompt='Password: ', stream=None) 

dsn_tns = cx_Oracle.makedsn('localhost', 1521, 'xe')
ora_conn = cx_Oracle.connect(username,userpwd,dsn=dsn_tns)
df1 = psql.read_sql('SELECT count(*) cnt,account_status FROM dba_users group by account_status', con=ora_conn) 
print(df1)
df1.plot.bar(x="ACCOUNT_STATUS",y=["CNT"],rot=0)
plt.show()
ora_conn.close()</strong>

Hope you like it !!!

Posted in Installation, Linux, Python, Windows | Tagged: | Leave a Comment »

 
Tales From A Lazy Fat DBA

Its all about Databases & their performance, troubleshooting & much more .... ¯\_(ツ)_/¯

Thinking Out Loud

Michael T. Dinh, Oracle DBA

Notes On Oracle

by Mehmet Eser

Oracle Diagnostician

Performance troubleshooting as exact science

deveshdba

get sum oracle stuffs

Data Warehousing with Oracle

Dani Schnider's Blog

ORASteps

Oracle DBA's Daily Work

DBAspaceblog.com

Welcome everyone!! The idea of this blog is to help the DBA in their daily tasks. Enjoy.

Anand's Data Stories

Learn. Share. Repeat.

Tanel Poder's blog: Core IT for geeks and pros

Oracle Performance Tuning, Troubleshooting, Internals

Yet Another OCM

Journey as an Oracle Certified Master

DBAtricksWorld.com

Sharing Knowledge is ultimate key to Gaining knowledge...

Neil Chandler's DB Blog

A resource for Database Professionals

DBA Kevlar

Tips, tricks, (and maybe a few rants) so more DBA's become bulletproof!

OraExpert Academy

Consulting and Training

%d bloggers like this: