Quantcast
Channel: Teguh Triharto Learning Center
Browsing all 413 articles
Browse latest View live

Image may be NSFW.
Clik here to view.

.::: How to Sample Simulation Blocking, Identifying and Avoiding Deadlocks...

 1. open 3 terminal to connect mariadb[root@teguhth ~]# mysql -uroot -pEnter password:Welcome to the MariaDB monitor.  Commands end with ; or \g.Your MariaDB connection id is 3Server version:...

View Article


.:: Set Up Incremental Backup & restore in MariaDB MySQL :::.

A. Enable incremental backup There are two types of backups - full and incremental backups.A full backup has a collection of all MySQL queries.An incremental backup strategy saves the data that has...

View Article


Image may be NSFW.
Clik here to view.

.::: Monitor Transaction Log shipping using T-SQL SQL Server :::.

 continue from http://teguhth.blogspot.com/2021/10/configure-log-shipping.htmlA. Monitor Transaction Log shipping using T-SQL1. Get last Backup of database with LSN (Publisher Side):SELECT   d.name,...

View Article

Image may be NSFW.
Clik here to view.

.::: Monitor Mirroring SQL Server using T-SQL SQL Server :::.

continue from http://teguhth.blogspot.com/2018/10/how-to-mirroring-microsoft-sql-server.html1. Query monitoring fron Principal  SELECT @@servername as ServerName,   SERVERPROPERTY('ServerName') AS...

View Article

Image may be NSFW.
Clik here to view.

.::: Clear out /Cleansing MySql MariaDB binary log files :::.

A. clearing using interval day1. show binary logs before;MariaDB [(none)]> show binary logs;+------------------+-----------+| Log_name         | File_size |+------------------+-----------+|...

View Article


Image may be NSFW.
Clik here to view.

.::: Backup User User in MariaDB MySQL & restore user user using mysql dump :::.

 1. create user create user01, user02, user03CREATE USER 'user01'@'localhost' IDENTIFIED BY 'user';GRANT ALL PRIVILEGES ON *.* TO 'user01'@'localhost' WITH GRANT OPTION;CREATE USER 'user02'@'localhost'...

View Article

Image may be NSFW.
Clik here to view.

.::: Enabling GTIDs Replication in MySQL 8 for Master - Slave or Mirroring :::.

almost from mariadbhttp://teguhth.blogspot.com/2023/06/enabling-gtids-replication-in-mariadb.htmlA. Configure GTID Replica MySQL 81. install mysql8 on server01 &...

View Article

Image may be NSFW.
Clik here to view.

.::: Install Percona XtraDB Cluster 5.7 in Centos 7 (Galera for MySQL ) :::.

 A. Install Percona XtraDB 5.71. Install requirement lsof qpress socatyum install https://mirrors.cloud.tencent.com/percona/centos/7/RPMS/x86_64/qpress-11-1.el7.x86_64.rpm -yyum install lsof qpress...

View Article


Image may be NSFW.
Clik here to view.

.::: Enable NFS server in windows Server for Linux & Windows clients :::.

A. enable NSF Server & NSF Client in windows 1. enable role nfs2. add folder to becoma sharefolderB. Enable NFS Client to Linux1. Install nfs client yum install nfs-utils -y2. mount for...

View Article


Image may be NSFW.
Clik here to view.

.::: How to Sample Simulation Blocking in PostgreSQL EDB :::.

1. Create a Test Table:-bash-4.2$ psqlpsql (15.4)Type "help" for help.postgres=# \c teguhthYou are now connected to database "teguhth" as user "postgres".teguhth=#First, create a test table in your...

View Article

Image may be NSFW.
Clik here to view.

.:: Simulate Deadlock in PostgreSQL & Solution :::.

 1. create tableCREATE TABLE ABC (ID INT PRIMARY KEY);CREATE TABLE XYZ (ID INT PRIMARY KEY);2. Open Session – 1 and execute below code:BEGIN;INSERT INTO ABC VALUES (1); select '1'; 3. Open Session – 2...

View Article

Image may be NSFW.
Clik here to view.

.::: Upgrade PostgreSQL from 15 to 16 on CentOS 8 :::.

 1. check version before upgradeSELECT version();select pg_read_file('/etc/hostname') as hostname, version(); [root@teguhth ~]# su - postgresLast login: Wed Oct 11 11:15:58 WIB 2023 on pts/1-bash-4.2$...

View Article

Image may be NSFW.
Clik here to view.

.:: How to Fix Error: Failed to download metadata for repo CentOS-8...

 Make sure for instalation likeadd repository "Minimal"file://    /run/install/repo/minimal 1. Try Install[root@teguhth02 ~]# yum install wget -yCentOS-8 - AppStream...

View Article


Image may be NSFW.
Clik here to view.

.::: Get BINLOG_GTID_POS, Slave status, master status in MariaDB, MySQL :::.

 1. check master status in master SHOW MASTER STATUS[root@teguhth01 ~]# mysql -uroot -proot -e "SHOW MASTER STATUS;"+------------------+----------+--------------+------------------+| File             |...

View Article

Image may be NSFW.
Clik here to view.

.::: How to Check Uptime PostgreSQL, EDB, Yugabyte & Service PostgreSQL...

 1. check starttimeteguhth=# SELECT pg_postmaster_start_time() as StartTime;           starttime------------------------------- 2023-10-19 09:12:12.569427+07(1 row)teguhth=# 2. check uptime...

View Article


Image may be NSFW.
Clik here to view.

.::: How to Administration & Maintenance MaxScale v23 for MariaDB, MySQL :::.

 corelation http://teguhth.blogspot.com/2022/06/how-to-install-and-configure-maxscale.html1. set maintenance maxctrl list servers maxctrl set server galera02-v12 maintenancemaxctrl list servers...

View Article

Image may be NSFW.
Clik here to view.

.::: Using MariaDB MySQL Show Binary Logs in, clause, limit, convert to sql...

 1. show bin log event (in, from, limit) MariaDB [(none)]> SHOW BINLOG EVENTS in...

View Article


Image may be NSFW.
Clik here to view.

.::: How to SwitchOver Master Slave GTID Replication MariaDB Using MaxScale :::.

 A. check status before swo1. query to cek mastermysql -uroot -p -e "select @@hostname,@@version";mysql -uroot -p -e "show master status";mysql -uroot -p -e "show slave status\G" | grep -i -E...

View Article

Image may be NSFW.
Clik here to view.

.::: Script to backup user MySQL MariaDB & MarinaDB :::.

1. capture user select @@hostname,user,host from mysql.user where user like 'teguh%';show grants for 'teguh'@'%';show grants for 'teguh'@'localhost';MariaDB [(none)]> select @@hostname,user,host...

View Article

Image may be NSFW.
Clik here to view.

.::: Grouping SQl Server by Date/day. dan Archive Database (table) base on...

 1. create database source & destinationcreate database teguhth;create database teguhth_archive;select @@servername as ServerName,* from sys.sysdatabases where name like '%teguhth%' 2. create table...

View Article
Browsing all 413 articles
Browse latest View live