How to securely store passwords in a database.

Keeping your passwords in a database in a plane format is a very bad idea. So why not to use hashing? Sure you can use hash, end it is totally OK to compare hash against hash. Especially if the password you want to store are not yours. Then this is the way to do it...

MariaDB SQL Recursive call to self (single table)

If you need to recursively query data based on child / parent relation between rows, you can achieve that using WITH RECURSIVE & UNITE ALL query instructions. Let’s have a look at example “software table”. Software can be declared as virtual machine,...

MariaDB add database user SQL

You more likely know how to create a database user using PhpMyAdmin or some other administrative tool. But sometimes we need to create a database user and add privileges manually. Here is an example SQL which does just that: Adding MariaDB database user, managing his...