Flush caching BIND (DNS cache)

All you have to do is restart bind to clear its cache:

root# /etc/init.d/named restart

You can also use rndc command as follows flush out all cache:

root# rndc restart

or

root# rndc exec

BIND v9.3.0 and above will support flushing all of the records attached to a particular domain name with rndc flushname command.

root# rndc flushname domain.name.com

It is also possible to flush out BIND views. For example, lan and wan views can be flushed using the following command:

root# rndc flush lan
root# rndc flush wan

How to backup and restore a MySQL database.

The mysqldump command creates a text version of the database. Specifically, it creates a list of SQL statements which can be used to restore/recreate the original database.
The syntax is:
# mysqldump -u root -p[root_password] [database_name] > backup.sql – backup.
# mysql -u root -p[root_password] [database_name] < backup.sql - restore.

Back up a single database:
The mysqldump command will backup the mydb database and dumps the output to the mydb.sql file

# mysqldump -u root -pmysqlpassword mydb > mydb.sql

Actually, if you don't provide a password at this stage, later you will be prompted for it.

Back up the multiple databases:

# mysqldump -u root -pmysqlpassword --databases mydb somedb > mydb_somedb.sql

Back up all of the databases:


# mysqldump -u root -pmysqlpassword --all-databases > all_databases.sql

Back up a specific table:
In this example, we takes a back up only of the users table from the mydb database.

# mysqldump -u root -pmysqlpassword mydb users > mysb_table_users.sql

To restore the MySQL database from a backup:
Execute the mysql command with "<" as shown below. If you are going to restore the mydb.sql to a different server, the mydb database must be created on this server.
# mysql -u root -pmysqlpassword

mysql> create database mydb;
Query OK, 1 row affected (0.02 sec)

# mysql -u root -pmysqlpassword mydb < mydb.sql

If you are trying to restore a single database from dump of all the databases, you have to let mysql know like this:

mysql --one-database database_name < all_databases.sql