Tips&Tricks from java developer


Blog

About me

Projects:

- AB English Courses

- StillSmallVoice.ru

- StillMakeUp.ru

How to get database size on PostgreSQL?

Problem You'd like to know how big is your PostgreSQL database. Solution Just run this query: SELECT pg_size_pretty(pg_database_size('database')) where: * database - your database name Read also PostgreSQL Disk Usage… »

  • 5 years ago
  • how-to, database, postgresql
  • Comments

How to view a replication lag on PostgreSQL?

Problem You'd like to know how big is the replication lag between master and slave on PostgreSQL. Solution You may run this query on your slave host: SELECT EXTRACT(EPOCH FROM (now() - pg_last_… »

  • 5 years ago
  • how-to, database, postgresql
  • Comments

How to view all related tables in Mysql/MariaDB?

Problem You want to view all tables related to specific table by foreign keys. Or you'd like to see all tables related to specific column. Solution You can use this simple query: For specific table… »

  • 6 years ago
  • mysql, database, how-to, mariadb
  • Comments

How-to reset mysql root password

Problem You forget or don't know administrator password for mysql or mariaDB. You should have access to server (terminal or ssh) Solution To reset mysql administrator (root) password you should: 1. Stop database: sudo systemctl… »

  • 6 years ago
  • mysql, database, how-to, mariadb
  • Comments
Page 1 of 1