List Postgres schema

June 28th, 2022 by ayad
SELECT schema_name
FROM information_schema.schemata;

Check the latest stable version available for upgrade? Kubernetes

June 28th, 2022 by ayad

kubeadm upgrade plan

get pod yaml file

June 27th, 2022 by ayad

kubectl get pod orange -o yaml > /root/orange.yaml

PostgreSQL table contains a lot of useful information about database sessions.

June 27th, 2022 by ayad

select pid as process_id, usename as username, datname as database_name, client_addr as client_address, application_name, backend_start, state, state_change from pg_stat_activity;

postgres – Create user and grant permission access

June 26th, 2022 by ayad
CREATE USER username WITH PASSWORD 'your_password';
GRANT USAGE ON SCHEMA schema_name TO username;

Delete Mail delivery failed in cpanel

June 22nd, 2022 by ayad

doveadm expunge -u mailbox INBOX subject ‘Mail delivery failed’

update wordpress database wp-options table for site url

June 22nd, 2022 by ayad

PDATE el_options SET option_value = replace(option_value, ‘’, ‘’)  WHERE option_name = ‘home’ OR option_name = ‘siteurl’;

note: is the source and will be after the change

Install wordpress on docker with docker-compose

June 20th, 2022 by ayad


   image: wordpress


    – mariadb:mysql





    – “”


    – ./html:/var/www/html


   image: mariadb:10.8.2


    – MYSQL_ROOT_PASSWORD=1qa2ws3ed

    – MYSQL_DATABASE=wordpress


    – ./database:/var/lib/mysql

Database table disk usage in Mariadb/Mysql

June 18th, 2022 by ayad

SELECT table_name as “Table”, ROUND(((data_length +index_length) / 1024 / 1024), 2) AS “Size in (MB)” FROM information_schema.TABLES WHERE table_schema = “ayaddb” ORDER BY (data_length + index_length) DESC;

note: ayaddb is the database name that you want to check the table disk size for it

Delete all docker containers with existed status

June 1st, 2022 by ayad

docker rm $(docker ps -a -q -f status=exited)