Category Archives: MySQL

Having and group by


Get members by birthday duration



MySQL Commands

  1. Login:
  2. Show password policy:
  3. Show all databases
  4. Backup DB:
  5. Import DB:
  6. Create a new user:

    Note: ‘10.0.1.%’ could be replaced with ‘localhost’
    Password generator:
  7. Grant permission to an user:


Join a sub query with group by statement

Find members that have the same password

More Advanced – Get minimum member ID from members that have same password:



Get nearby places using SQL

Get result of stored procedure via PHP

DB account must have “execute” permission!

Stored procedure example:

PHP example: (Codeigniter)


Using binary column in where clause