Posts
Showing posts from February, 2026
MySQL: DB connection with SSL and keystores
- Get link
- X
- Other Apps
Create Client pkcs#12 openssl pkcs12 -export -in /etc/mysql/certs/client-cert.pem -inkey /etc/mysql/certs/client-key.pem -certfile /etc/mysql/certs/ca-cert.pem -out /tmp/client-keystore.p12 -name mysqlclient -passout pass:changeit Create Trusstore PKCS keytool -import -trustcacerts -file /etc/mysql/certs/ca-cert.pem -alias mysqlserver -keystore /tmp/mysql-truststore.p12 -storetype PKCS12 -storepass changeit -noprompt JDBC URL: jdbc:mysql://mysql-pmmdevdb601.gcp.tmw.com:3306/pmmdvlp?useSSL=true&requireSSL=true&verifyServerCertificate=true&clientCertificateKeyStoreUrl=file:/tmp/client-keystore.p12&clientCertificateKeyStorePassword=changeit&clientCertificateKeyStoreType=PKCS12&trustCertificateKeyStoreUrl=file:/tmp/mysql-truststore.p12&trustCertificateKeyStorePassword=changeit&trustCertificateKeyStoreType=PKCS12 jdbc:mysql://mysql-pmmdevdb601.gcp.tmw.com:3306/pmmdvlp?useSSL=true&requireSSL=true&verifyServerCer...
Unix: To check when last a password was changed
- Get link
- X
- Other Apps
[root@pshrps601 ~]# chage -l psoft Last password change : May 24, 2010 Password expires : never Password inactive : never Account expires : never Minimum number of days between password change : -1 Maximum number of days between password change : -1 Number of days of warning before password expires : -1 [root@pshrps601 ~]#
Postgres: To get list of all partitions of a table
- Get link
- X
- Other Apps
SELECT child.relname AS partition_name FROM pg_class base_tb JOIN pg_inherits i ON i.inhparent = base_tb.oid JOIN pg_class child ON i.inhrelid = child.oid LEFT JOIN pg_partitioned_table pt ON pt.partrelid = child.oid WHERE base_tb.relname = 'coupons'; ------------------------------ SELECT nmsp_child.nspname AS partition_schema, child.relname AS partition_name, pg_get_userbyid(child.relowner) AS owner_name, pg_get_expr(child.relpartbound, child.oid) AS partition_bound FROM pg_inherits JOIN pg_class parent ON pg_inherits.inhparent = parent.oid JOIN pg_class child ON pg_inherits.inhrelid = child.oid JOIN pg_namespace nmsp_child ON nmsp_child.oid = child.relnamespace WHERE parent.relname = 'coupons' AND child.relkind = 'r' and child.relname like '%BEW%' ORDER BY child.relname;