create db user and password mariadb – done as production
Sunday, February 27th, 2022create user ‘db’user’@’10.10.5.5’ identified by ‘ ********** ’ ;
grant all privileges on `dyname`.* to ‘dbuser’@’10.10.5.5’;
create user ‘db’user’@’10.10.5.5’ identified by ‘ ********** ’ ;
grant all privileges on `dyname`.* to ‘dbuser’@’10.10.5.5’;
su – postgres/usr/pgsql-14/bin/pg_ctl promote -D /var/lib/pgsql/14/data/
select now()-pg_last_xact_replay_timestamp();
ALTER ROLE grafana_kms_srv WITH LOGIN;
GRANT SELECT ON ALL TABLES IN SCHEMA company_domain TO grafana_kms_srv;
GRANT SELECT ON ALL TABLES IN SCHEMA public TO grafana_kms_srv;
GRANT USAGE ON SCHEMA public TO grafana_fms_srv;
GRANT USAGE ON SCHEMA company_domain TO grafana_fms_srv;
put the ssh public key of your PC in the following command and run it in any server want to access without password
echo ‘put the public key here’ >> /root/.ssh/authorized_keys
SELECT * FROM pg_available_extensions;
or
run this in postgres
\dx