Posts

Showing posts from February, 2013

How repair ALL database tables:

Here the command for repair, alalyze or optimze all database talbes in server. # mysqlcheck -u root -p --auto-repair --check --optimize --all-databases Below commands are also do the same without mysql root password: For Repair: # mysqlcheck --all-databases -r For Analyze: # mysqlcheck --all-databases -a For optimize: # mysqlcheck --all-databases -o cheers!!!

Why BIND / NAMED service in Chroot?

You know, Why bind in Chroot ?     The idea behind chroot is fairly simple. When you run BIND (or any other process) in a chroot jail, the process is simply unable to see any part of the filesystem outside the jail. For example, in this document, we'll set BIND up to run chrooted to the directory /chroot/named. Well, to BIND, the contents of this directory will appear to be /, the root directory. Nothing outside this directory will be accessible to it. You've probably encounted a chroot jail before, if you've ever ftped into a public system. The idea behind running BIND in a chroot jail is to limit the amount of access any malicious individual could gain by exploiting vulnerabilities in BIND. It is for the same reason that we run BIND as a non-root user.   Note: The domain name service provided by BIND (named) software. It uses both UDP and TCP protocol and listen on port 53. DNS queries less than 512 bytes are transferred using UDP protocol

rsync VS scp

There are two main differences between rsync and scp.    Before a file is transferred rsync takes the checksums of the file  (MD5 and adler-32 I believe) and sends them to the receiver.  After a file is transferred the receiver verifies the data integrity using those checksums.    scp does not have such mechanism. scp uses ssh to transfer the data and although ssh uses checksums on the packet level that's a different story  Another difference is what happens during a transfer retry, While scp will ignore any partially transferred set of files and overwrite them on the receiving end,   but rsync is more clever than that. Rsync will check the destination for any files present and if their signature matches that of the files on the sender side it will not retransmit these files. It might be possible to overwrite this behavior.

Current Working DATABASE!

Image
To konw current working database in mysql:   Generally, The mysql Working environment like below, mysql> show databases; +--------------------+ | Database           | +--------------------+ | information_schema | | mysql              | | ranjith_test       | | test               | +--------------------+ 4 rows in set (0.14 sec) mysql> use ranjith_test; Database changed mysql> Add the following sector in my.cnf file to konw current working DB name [mysql] prompt=`mysql(\d)>` Then restart the mysql service. [root@ranjith ~]# /etc/init.d/mysqld restart Stopping MySQL:                                            [  OK  ] Starting MySQL:                                            [  OK  ] [root@ranjith ~]# Here, the mysql(\d) within symbol "`" is nothing but a back-ticket. After adding the above sector in my.cnf file, Yoru mysql environment start showing the current database name which you are working with, `mysql((none))>`show databases; +