Monday, June 20, 2022

PostgreSQL hot standby. ( DR solution for PostgreSQL)

I followed below steps to create the hot standby.


PRIMARY SERVER - 192.168.230.50

STANDBY SERVER - 192.168.230.51 


On Primary:
===========


postgres=# CREATE USER replica REPLICATION LOGIN ENCRYPTED PASSWORD 'H1j@ck123';

CREATE ROLE


postgres=# \du

                                     List of roles

 Role name  |                         Attributes                         |  Member of

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

 hecm_read | Password valid until infinity                              | {}

 postgres   | Superuser, Create role, Create DB, Replication, Bypass RLS | {}

 read_user  |                                                            | {readaccess}

 readaccess | Cannot login                                               | {}

 replica    | Replication                                                | {}




Change below settings on postgresql.conf:


archive_mode = on

#archive_command = 'true'

archive_command = 'cp -i %p /u01/PostgreSQL/10/data/archive/%f'

hot_standby = on

max_wal_size = 1GB

max_wal_senders = 10

wal_level = hot_standby

wal_log_hints = on

wal_keep_segments = 10

wal_receiver_status_interval = 5s

hot_standby_feedback = on

listen_addresses = '*' 


Add below entries in pg_hba.conf


host    replication     replica      192.168.230.51/24            md5




On Standby:
===========


Set below parameters in postgresql.conf:


archive_mode = on

#archive_command = 'true'

archive_command = 'cp -i %p /u01/PostgreSQL/10/data/archive/%f'

hot_standby = on


max_wal_size = 1GB

max_wal_senders = 10

wal_level = hot_standby

wal_log_hints = on

wal_keep_segments = 10

wal_receiver_status_interval = 5s

hot_standby_feedback = on



-bash-4.2$ telnet 192.168.230.50 5432

Trying 192.168.230.50...

telnet: connect to address 192.168.230.50: No route to host


Firewall disabled on Primary so it able to connect from standby



-bash-4.2$ ./pg_basebackup -h 192.168.230.50 -D /u01/PostgreSQL/10/data -U replica -v -P

Password:

pg_basebackup: initiating base backup, waiting for checkpoint to complete

pg_basebackup: checkpoint completed

pg_basebackup: write-ahead log start point: 0/15000028 on timeline 1

pg_basebackup: starting background WAL receiver

293182/293182 kB (100%), 1/1 tablespace

pg_basebackup: write-ahead log end point: 0/15000130

pg_basebackup: waiting for background process to finish streaming ...

pg_basebackup: base backup completed


[root@pgstand ~]# cd /u01/PostgreSQL/10/data/

[root@pgstand data]# cat recovery.conf

standby_mode = 'on'

primary_conninfo = 'host=192.168.230.50 port=5432 user=replica password=replicauser@'

restore_command = 'cp ///u01/PostgreSQL/10/data/archive/%f %p'

trigger_file = '/tmp/postgresql.trigger.5432'


-bash-4.2$ ./pg_ctl start -D /u01/PostgreSQL/10/data

waiting for server to start....2020-06-18 18:15:52.293 IST [4117] LOG:  listening on IPv4 address "0.0.0.0", port 5432

2020-06-18 18:15:52.293 IST [4117] LOG:  listening on IPv6 address "::", port 5432

2020-06-18 18:15:52.295 IST [4117] LOG:  listening on Unix socket "/tmp/.s.PGSQL.5432"

2020-06-18 18:15:52.406 IST [4117] LOG:  redirecting log output to logging collector process

2020-06-18 18:15:52.406 IST [4117] HINT:  Future log output will appear in directory "log".

 done

server started


Now standby is ready as a hot standby.



Check replication status on Primary:
====================================


postgres=# \x

Expanded display is on.

postgres=# select * from pg_stat_replication;
-[ RECORD 1 ]----+---------------------------------
pid              | 24732
usesysid         | 75624
usename          | replica
application_name | walreceiver
client_addr      | 192.168.230.51
client_hostname  |
client_port      | 41052
backend_start    | 2020-06-18 18:15:52.940476+05:30
backend_xmin     | 219065
state            | streaming
sent_lsn         | 0/16000140
write_lsn        | 0/16000140
flush_lsn        | 0/16000140
replay_lsn       | 0/16000140
write_lag        | 00:00:00.000509
flush_lag        | 00:00:00.00106
replay_lag       | 00:00:00.00122
sync_priority    | 0
sync_state       | async




Testing:
========

Create an object in Primary and see if that replicates to Secondary:

On Primary:
===========

postgres=# create database newtestdb;

CREATE DATABASE



On Standby:
===========


postgres=# \l

                                  List of databases

    Name    |  Owner   | Encoding |   Collate   |    Ctype    |   Access privileges

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

 newtestdb  | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 |

 newdb      | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 | =Tc/postgres         +

            |          |          |             |             | postgres=CTc/postgres+

            |          |          |             |             | readaccess=c/postgres

 postgres   | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 | =Tc/postgres         +

            |          |          |             |             | postgres=CTc/postgres+

            |          |          |             |             | readaccess=c/postgres

 template0  | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 | =c/postgres          +

            |          |          |             |             | postgres=CTc/postgres

 template1  | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 | =c/postgres          +

            |          |          |             |             | postgres=CTc/postgres


postgres=# \c newtestdb

You are now connected to database "newtestdb" as user "postgres".


newtestdb=# \dt+ t

 public | t    | table | postgres | 8192 bytes |


newtestdb=# create table D  ( name text);

ERROR:  cannot execute CREATE TABLE in a read-only transaction




Thanks,
























Thursday, June 16, 2022

MySQL 8 installation on RHEL7 64bit using RPM - ( MYSQL installation using RPM )

 Below can be followed to install MYSQL 8 on RHEL7 64bit


[root@pgprim PG_RPMS]# ls -ltr mysq*

-rw-r--r--. 1 7155 31415  14668996 Mar 24 17:13 mysql-community-client-8.0.29-1.el7.x86_64.rpm

-rw-r--r--. 1 7155 31415   2574424 Mar 24 17:13 mysql-community-client-plugins-8.0.29-1.el7.x86_64.rpm

-rw-r--r--. 1 7155 31415    648680 Mar 24 17:13 mysql-community-common-8.0.29-1.el7.x86_64.rpm

-rw-r--r--. 1 7155 31415 445936940 Mar 24 17:14 mysql-community-debuginfo-8.0.29-1.el7.x86_64.rpm

-rw-r--r--. 1 7155 31415   1949700 Mar 24 17:14 mysql-community-devel-8.0.29-1.el7.x86_64.rpm

-rw-r--r--. 1 7155 31415   4214948 Mar 24 17:14 mysql-community-embedded-compat-8.0.29-1.el7.x86_64.rpm

-rw-r--r--. 1 7155 31415   2216040 Mar 24 17:15 mysql-community-icu-data-files-8.0.29-1.el7.x86_64.rpm

-rw-r--r--. 1 7155 31415   1575404 Mar 24 17:15 mysql-community-libs-8.0.29-1.el7.x86_64.rpm

-rw-r--r--. 1 7155 31415    683148 Mar 24 17:15 mysql-community-libs-compat-8.0.29-1.el7.x86_64.rpm

-rw-r--r--. 1 7155 31415  55984868 Mar 24 17:15 mysql-community-server-8.0.29-1.el7.x86_64.rpm

-rw-r--r--. 1 7155 31415  22960584 Mar 24 17:16 mysql-community-server-debug-8.0.29-1.el7.x86_64.rpm

-rw-r--r--. 1 7155 31415 270450256 Mar 24 17:17 mysql-community-test-8.0.29-1.el7.x86_64.rpm

-rw-r--r--. 1 root root  823879680 May 30 20:30 mysql-8.0.29-1.el7.x86_64.rpm-bundle.tar

[root@pgprim PG_RPMS]# rpm -ivh mysql-community-common-8.0.29-1.el7.x86_64.rpm

warning: mysql-community-common-8.0.29-1.el7.x86_64.rpm: Header V4 RSA/SHA256 Signature, key ID 3a79bd29: NOKEY

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

Updating / installing...

   1:mysql-community-common-8.0.29-1.e################################# [100%]

[root@pgprim PG_RPMS]# rpm -ivh mysql-community-client-plugins-8.0.29-1.el7.x86_64.rpm

warning: mysql-community-client-plugins-8.0.29-1.el7.x86_64.rpm: Header V4 RSA/SHA256 Signature, key ID 3a79bd29: NOKEY

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

Updating / installing...

   1:mysql-community-client-plugins-8.################################# [100%]

[root@pgprim PG_RPMS]# rpm -ivh mysql-community-libs-8.0.29-1.el7.x86_64.rpm

warning: mysql-community-libs-8.0.29-1.el7.x86_64.rpm: Header V4 RSA/SHA256 Signature, key ID 3a79bd29: NOKEY

error: Failed dependencies:

        mariadb-libs is obsoleted by mysql-community-libs-8.0.29-1.el7.x86_64

[root@pgprim PG_RPMS]# rpm -e mariadb-libs*

error: package mariadb-libs* is not installed

[root@pgprim PG_RPMS]# rpm -qa| grep mariadb-libs

mariadb-libs-5.5.35-3.el7.x86_64

[root@pgprim PG_RPMS]# rpm -e mariadb-libs-5.5.35-3.el7.x86_64

error: Failed dependencies:

        libmysqlclient.so.18()(64bit) is needed by (installed) qt-mysql-1:4.8.5-8.el7.x86_64

        libmysqlclient.so.18()(64bit) is needed by (installed) perl-DBD-MySQL-4.023-5.el7.x86_64

        libmysqlclient.so.18()(64bit) is needed by (installed) net-snmp-1:5.7.2-18.el7.x86_64

        libmysqlclient.so.18()(64bit) is needed by (installed) postfix-2:2.10.1-6.el7.x86_64

        libmysqlclient.so.18(libmysqlclient_18)(64bit) is needed by (installed) qt-mysql-1:4.8.5-8.el7.x86_64

        libmysqlclient.so.18(libmysqlclient_18)(64bit) is needed by (installed) perl-DBD-MySQL-4.023-5.el7.x86_64

        libmysqlclient.so.18(libmysqlclient_18)(64bit) is needed by (installed) postfix-2:2.10.1-6.el7.x86_64

        mariadb-libs(x86-64) = 1:5.5.35-3.el7 is needed by (installed) mariadb-1:5.5.35-3.el7.x86_64

        mariadb-libs(x86-64) = 1:5.5.35-3.el7 is needed by (installed) mariadb-server-1:5.5.35-3.el7.x86_64

        mysql-libs is needed by (installed) net-snmp-1:5.7.2-18.el7.x86_64

[root@pgprim PG_RPMS]# rpm -e --allmatches mariadb-libs-5.5.35-3.el7.x86_64

error: Failed dependencies:

        libmysqlclient.so.18()(64bit) is needed by (installed) qt-mysql-1:4.8.5-8.el7.x86_64

        libmysqlclient.so.18()(64bit) is needed by (installed) perl-DBD-MySQL-4.023-5.el7.x86_64

        libmysqlclient.so.18()(64bit) is needed by (installed) net-snmp-1:5.7.2-18.el7.x86_64

        libmysqlclient.so.18()(64bit) is needed by (installed) postfix-2:2.10.1-6.el7.x86_64

        libmysqlclient.so.18(libmysqlclient_18)(64bit) is needed by (installed) qt-mysql-1:4.8.5-8.el7.x86_64

        libmysqlclient.so.18(libmysqlclient_18)(64bit) is needed by (installed) perl-DBD-MySQL-4.023-5.el7.x86_64

        libmysqlclient.so.18(libmysqlclient_18)(64bit) is needed by (installed) postfix-2:2.10.1-6.el7.x86_64

        mariadb-libs(x86-64) = 1:5.5.35-3.el7 is needed by (installed) mariadb-1:5.5.35-3.el7.x86_64

        mariadb-libs(x86-64) = 1:5.5.35-3.el7 is needed by (installed) mariadb-server-1:5.5.35-3.el7.x86_64

        mysql-libs is needed by (installed) net-snmp-1:5.7.2-18.el7.x86_64

[root@pgprim PG_RPMS]# yum list installed | grep mysql

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

mysql-community-client-plugins.x86_64  8.0.29-1.el7                installed

mysql-community-common.x86_64          8.0.29-1.el7                installed

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

[root@pgprim PG_RPMS]# yum list installed | grep maria

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

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

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

[root@pgprim PG_RPMS]# yum remove maria*

Loaded plugins: langpacks, product-id, subscription-manager

This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.

Resolving Dependencies

--> Running transaction check

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

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

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

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

--> Processing Dependency: libmysqlclient.so.18()(64bit) for package: 1:net-snmp-5.7.2-18.el7.x86_64

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

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

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

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

--> Processing Dependency: mysql-libs for package: 1:net-snmp-5.7.2-18.el7.x86_64

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

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

--> Running transaction check

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

---> Package net-snmp.x86_64 1:5.7.2-18.el7 will be erased

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

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

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

--> Finished Dependency Resolution


Dependencies Resolved


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

 Package                           Arch                      Version                            Repository                        Size

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

Removing:

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

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

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

Removing for dependencies:

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

 net-snmp                          x86_64                    1:5.7.2-18.el7                     @anaconda/7.0                    849 k

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

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

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


Transaction Summary

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

Remove  3 Packages (+5 Dependent packages)


Installed size: 122 M

Is this ok [y/N]: y

Downloading packages:

Running transaction check

Running transaction test

Transaction test succeeded

Running transaction

Warning: RPMDB altered outside of yum.

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

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

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

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

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

  Erasing    : 1:net-snmp-5.7.2-18.el7.x86_64                                                                                      6/8

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

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

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

  Verifying  : 2:postfix-2.10.1-6.el7.x86_64                                                                                       2/8

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

  Verifying  : akonadi-mysql-1.9.2-4.el7.x86_64                                                                                    4/8

  Verifying  : 1:mariadb-libs-5.5.35-3.el7.x86_64                                                                                  5/8

  Verifying  : 1:net-snmp-5.7.2-18.el7.x86_64                                                                                      6/8

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

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


Removed:

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


Dependency Removed:

  akonadi-mysql.x86_64 0:1.9.2-4.el7 net-snmp.x86_64 1:5.7.2-18.el7 perl-DBD-MySQL.x86_64 0:4.023-5.el7 postfix.x86_64 2:2.10.1-6.el7

  qt-mysql.x86_64 1:4.8.5-8.el7


Complete!

[root@pgprim PG_RPMS]# rpm -ivh mysql-community-libs-8.0.29-1.el7.x86_64.rpm

warning: mysql-community-libs-8.0.29-1.el7.x86_64.rpm: Header V4 RSA/SHA256 Signature, key ID 3a79bd29: NOKEY

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

Updating / installing...

   1:mysql-community-libs-8.0.29-1.el7################################# [100%]

[root@pgprim PG_RPMS]#

[root@pgprim PG_RPMS]#

[root@pgprim PG_RPMS]#

[root@pgprim PG_RPMS]# ls -ltr mysq*

-rw-r--r--. 1 7155 31415  14668996 Mar 24 17:13 mysql-community-client-8.0.29-1.el7.x86_64.rpm

-rw-r--r--. 1 7155 31415   2574424 Mar 24 17:13 mysql-community-client-plugins-8.0.29-1.el7.x86_64.rpm

-rw-r--r--. 1 7155 31415    648680 Mar 24 17:13 mysql-community-common-8.0.29-1.el7.x86_64.rpm

-rw-r--r--. 1 7155 31415 445936940 Mar 24 17:14 mysql-community-debuginfo-8.0.29-1.el7.x86_64.rpm

-rw-r--r--. 1 7155 31415   1949700 Mar 24 17:14 mysql-community-devel-8.0.29-1.el7.x86_64.rpm

-rw-r--r--. 1 7155 31415   4214948 Mar 24 17:14 mysql-community-embedded-compat-8.0.29-1.el7.x86_64.rpm

-rw-r--r--. 1 7155 31415   2216040 Mar 24 17:15 mysql-community-icu-data-files-8.0.29-1.el7.x86_64.rpm

-rw-r--r--. 1 7155 31415   1575404 Mar 24 17:15 mysql-community-libs-8.0.29-1.el7.x86_64.rpm

-rw-r--r--. 1 7155 31415    683148 Mar 24 17:15 mysql-community-libs-compat-8.0.29-1.el7.x86_64.rpm

-rw-r--r--. 1 7155 31415  55984868 Mar 24 17:15 mysql-community-server-8.0.29-1.el7.x86_64.rpm

-rw-r--r--. 1 7155 31415  22960584 Mar 24 17:16 mysql-community-server-debug-8.0.29-1.el7.x86_64.rpm

-rw-r--r--. 1 7155 31415 270450256 Mar 24 17:17 mysql-community-test-8.0.29-1.el7.x86_64.rpm

-rw-r--r--. 1 root root  823879680 May 30 20:30 mysql-8.0.29-1.el7.x86_64.rpm-bundle.tar

[root@pgprim PG_RPMS]# rpm -ivh mysql-community-libs-compat-8.0.29-1.el7.x86_64.rpm

warning: mysql-community-libs-compat-8.0.29-1.el7.x86_64.rpm: Header V4 RSA/SHA256 Signature, key ID 3a79bd29: NOKEY

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

Updating / installing...

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

[root@pgprim PG_RPMS]# rpm -ivh mysql-community-client-8.0.29-1.el7.x86_64.rpm

warning: mysql-community-client-8.0.29-1.el7.x86_64.rpm: Header V4 RSA/SHA256 Signature, key ID 3a79bd29: NOKEY

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

Updating / installing...

   1:mysql-community-client-8.0.29-1.e################################# [100%]

[root@pgprim PG_RPMS]# rpm -ivh mysql-community-server-8.0.29-1.el7.x86_64.rpm

warning: mysql-community-server-8.0.29-1.el7.x86_64.rpm: Header V4 RSA/SHA256 Signature, key ID 3a79bd29: NOKEY

error: Failed dependencies:

        mysql-community-icu-data-files = 8.0.29-1.el7 is needed by mysql-community-server-8.0.29-1.el7.x86_64

[root@pgprim PG_RPMS]# rpm -ivh mysql-community-icu-data-files-8.0.29-1.el7.x86_64.rpm

warning: mysql-community-icu-data-files-8.0.29-1.el7.x86_64.rpm: Header V4 RSA/SHA256 Signature, key ID 3a79bd29: NOKEY

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

Updating / installing...

   1:mysql-community-icu-data-files-8.################################# [100%]

[root@pgprim PG_RPMS]# rpm -ivh mysql-community-server-8.0.29-1.el7.x86_64.rpm

warning: mysql-community-server-8.0.29-1.el7.x86_64.rpm: Header V4 RSA/SHA256 Signature, key ID 3a79bd29: NOKEY

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

Updating / installing...

   1:mysql-community-server-8.0.29-1.e################################# [100%]

[root@pgprim PG_RPMS]# systemctl start mysqld

[root@pgprim PG_RPMS]# systemctl status mysqld

mysqld.service - MySQL Server

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

   Active: active (running) since Thu 2022-06-16 22:02:18 IST; 6s ago

     Docs: man:mysqld(8)

           http://dev.mysql.com/doc/refman/en/using-systemd.html

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

 Main PID: 23710 (mysqld)

   Status: "Server is operational"

   CGroup: /system.slice/mysqld.service

           └─23710 /usr/sbin/mysqld


Jun 16 22:02:18 pgprim.test.com systemd[1]: Started MySQL Server.

[root@pgprim PG_RPMS]# cat /var/log/mysqld.log | grep password

2022-06-16T16:32:14.802371Z 6 [Note] [MY-010454] [Server] A temporary password is generated for root@localhost: z>wsG>!ki8R6

[root@pgprim PG_RPMS]#



[root@pgprim PG_RPMS]# cat /var/log/mysqld.log | grep password

2022-06-16T16:32:14.802371Z 6 [Note] [MY-010454] [Server] A temporary password is generated for root@localhost: z>wsG>!ki8R6



[root@pgprim PG_RPMS]# mysql -uroot -p

Enter password:

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

Your MySQL connection id is 9

Server version: 8.0.29


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>




Thanks,
SM