Tips&Tricks

How to change permissions for file / directory recursively in Linux

Change owner for directory recursively: sudo chown -R user:group /path/to/directory Chown is a short for “change owner”, -R – means “recursively”, owner and group definition are separated by “:”. Also we need high privileges to run chown command – so we use “sudo”. Change permissions only for directories recursively: find /path/to/directory -type d -exec chmod 755 {}Continue Reading


How to fix

How to flush DNS cache in Ubuntu / Debian / Linux Mint

The Domain Name System (DNS) is a hierarchical decentralized naming system. It’s used for computers, services, or other resources connected to the Internet or a private network. It associates various information with domain names assigned to each of the participating entities. Most prominently, it translates more readily memorized domain names to the numerical IP addresses.Continue Reading


How to fix

Can’t connect to local MySQL server through socket ‘/var/run/mysqld/mysqld.sock’

When working with MySQL / MariaDB database you can catch a strange error: ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ‘/var/run/mysqld/mysqld.sock’ (2) The same error in log files: [ERROR] Can’t start server : Bind on unix socket: No such file or directory [ERROR] Do you already have another mysqld server runningContinue Reading