Using sudo without password

sudoWhen you issue a sudo command you will be asked to type your password to execute it and this can be quite annoying, especially for people like me that open the terminal every 3 minutes and don’t want to login as root every time.

To solve this “problem” you need to edit sudo’s configuration file, located in /etc/sudoers, but it’s not recommended to do it directly. To modify this file, you have to use visudo that makes a temporary copy of the sudoers file and checks for errors before saving. Continue reading “Using sudo without password”

MySQL: database backup, compression and restore

The easier and quicker way to backup a database is using mysqldump command.

The syntax is as follows:

backup:

mysqldump –u [uname] –p [pass] [dbname] > [backupfile.sql]

restore:

mysql –u [uname] –p [pass] [dbname] < [backupfile.sql]

Continue reading “MySQL: database backup, compression and restore”