List Postgres schema
Tuesday, June 28th, 2022SELECT schema_name FROM information_schema.schemata;
SELECT schema_name FROM information_schema.schemata;
kubeadm upgrade plan
kubectl get pod orange -o yaml > /root/orange.yaml
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;
CREATE USER username WITH PASSWORD 'your_password';
GRANT USAGE ON SCHEMA schema_name TO username;
GRANT SELECT ON ALL TABLES IN SCHEMA schema_name TO username;
doveadm expunge -u email@address.com mailbox INBOX subject ‘Mail delivery failed’
PDATE el_options SET option_value = replace(option_value, ‘https://ayad.iq/’, ‘https://henry.com/’) WHERE option_name = ‘home’ OR option_name = ‘siteurl’;
note: ayad.com is the source and will be henry.com after the change
wordpress:
image: wordpress
links:
– mariadb:mysql
environment:
– WORDPRESS_DB_PASSWORD=1qa2ws3ed
– WORDPRESS_DB_USER=root
ports:
– “10.4.17.163:80:80”
volumes:
– ./html:/var/www/html
mariadb:
image: mariadb:10.8.2
environment:
– MYSQL_ROOT_PASSWORD=1qa2ws3ed
– MYSQL_DATABASE=wordpress
volumes:
– ./database:/var/lib/mysql
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
docker rm $(docker ps -a -q -f status=exited)