What the heck is ‘www-data’

The ‘www-data’ is the default user of Nginx and Apache servers on Ubuntu system. That’s why when we need to serve some files or CMS with Nginx we change the ownership of the folder to: www-data:www-data If you are wondering why there’s 2 ‘www-data’ separated by colon, it’s because first is the username and second … Read more

Useful and important commands for mySQL & MariaDB

Create database: CREATE DATABASE database1; Create user CREATE USER user IDENTIFIED BY ‘secure_password’; Grant all privileges on specific database: GRANT ALL PRIVILEGES ON database1.* TO user; Show all users: SELECT User FROM mysql.user; Show all databases: SHOW DATABASES; Delete user: DROP User ‘user’@’localhost’; Remove database: DROP DATABASE YourDatabase; Reload the GRANT tables to enable the … Read more