Category Archives: MySQL

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: https://www.browserling.com/tools/mysql-password
  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:

 

Reference:

Get nearby places using SQL

Get result of stored procedure via PHP

DB account must have “execute” permission!

Stored procedure example:

PHP example: (Codeigniter)

Reference:

Using binary column in where clause

 

Update Column Values from Another Table (update sql)

Reference:

Update from a select: