A saint asked his disciples, 'Why do we shout in anger? Why do people shout at each other when they are upset?'
Disciples thought for a while, one of them said, 'Because we lose our calm, we shout for that.'
'But, why to shout when the other person is just next to you?' asked the saint. 'Isn't it possible to speak to him or her with a soft voice? Why do you shout at a person when you're angry?'
Disciples gave some other answers but none satisfied the saint.
Finally he explained, 'When two people are angry at each other, their hearts distance a lot. To cover that distance they must shout to be able to hear each other. The angrier they are, the stronger they will have to shout to hear each other through that great distance.'
Then the saint asked, 'What happens when two people fall in love? They don't shout at each other but talk softly, why? Because their hearts are very close. The distance between them is very small...'
The saint continued, 'When they love each other even more, what happens? They do not speak, only whisper and they get even closer to each other in their love. Finally they even need not whisper, they only look at each other and that's all. That is how close two people are when they love each other.'
MORAL: When you argue do not let your hearts get distant, do not say words that distance each other more, else there will come a day when the distance is so great that you will not find the path to return.
Wednesday, April 22, 2009
Let the spirit of friendship in us not die
Horror gripped the heart of a World War-I soldier, as he saw his lifelong friend fall in battle. Caught in a trench with continuous gunfire whizzing over his head, the soldier asked his Lieutenant if he could go out into the "no man's land" between the trenches to bring his fallen comrade back. "You can go," said the Lieutenant, "but I don't think it will be worth it. Your friend is probably dead and you may throw your life away."
The Lieutenant's words didn't matter, and the soldier went anyway. Miraculously, he managed to reach his friend, hoisted him onto his shoulder and brought him back to their company's trench. As the two of them tumbled in together to the bottom of the trench, the officer checked the wounded soldier, then looked kindly at his friend. "I told you it wouldn't be worth it," he said. "Your friend is dead and you are Mortally wounded." "It was worth it, Sir," said the soldier. "What do you mean by worth it?" responded the Lieutenant. "Your friend is dead." "Yes Sir," the private answered, "but it was worth it because when I got to him, he was still alive and I had the satisfaction of hearing him say...."Jim...I knew you'd come."
Many times in life, whether a thing is worth doing or not, really depends on how u look at it. Take up all your courage and do something your heart tells you to do so that you may not regret not doing it later in your life..
The Lieutenant's words didn't matter, and the soldier went anyway. Miraculously, he managed to reach his friend, hoisted him onto his shoulder and brought him back to their company's trench. As the two of them tumbled in together to the bottom of the trench, the officer checked the wounded soldier, then looked kindly at his friend. "I told you it wouldn't be worth it," he said. "Your friend is dead and you are Mortally wounded." "It was worth it, Sir," said the soldier. "What do you mean by worth it?" responded the Lieutenant. "Your friend is dead." "Yes Sir," the private answered, "but it was worth it because when I got to him, he was still alive and I had the satisfaction of hearing him say...."Jim...I knew you'd come."
Many times in life, whether a thing is worth doing or not, really depends on how u look at it. Take up all your courage and do something your heart tells you to do so that you may not regret not doing it later in your life..
Saturday, April 18, 2009
A Lot Like Love - One of the best movie
Tuesday, April 14, 2009
Setting up Mysql Replication
Configure The Master :
1. First we have to edit /etc/mysql/my.cnf. We have to enable networking for MySQL, and MySQL should listen on all IP addresses, therefore we comment out these lines (if existant):
#skip-networking
#bind-address = 127.0.0.1
2. Furthermore we have to tell MySQL for which database it should write logs (these logs are used by the slave to see what has changed on the master), which log file it should use, and we have to specify that this MySQL server is the master. We want to replicate the database testDB, so we put the following lines into /etc/mysql/my.cnf:
log-bin = /var/log/mysql/mysql-bin.log
binlog-do-db=testDB
server-id=1
Note: write these under [mysqld]
3. Then we restart MySQL:
/etc/init.d/mysql restart
4. Then we log into the MySQL database as root and create a user with replication privileges:
mysql -u root -p
Enter password:
Now we are on the MySQL shell.
GRANT REPLICATION SLAVE ON *.* TO 'slave_user'@'%' IDENTIFIED BY '';
Note : (Replace with a real password!)
FLUSH PRIVILEGES;
5. Next (still on the MySQL shell) do this:
USE testDB;
FLUSH TABLES WITH READ LOCK;
SHOW MASTER STATUS;
The last command will show something like this:
+---------------+----------+--------------+------------------+
| File | Position | Binlog_do_db | Binlog_ignore_db |
+---------------+----------+--------------+------------------+
| mysql-bin.006 | 183 | testDB | |
+---------------+----------+--------------+------------------+
1 row in set (0.00 sec)
6. Write down this information, we will need it later on the slave!
Then leave the MySQL shell:
quit;
7. Take a dump of the database need to replicate(testDB)
mysqldump -u root -p --opt testDB > testDB.sql
Note : (Replace with the real password for the MySQL user root! Important: There is no space between -p and !)
This will create an SQL dump of testDB in the file testDB.sql. Transfer this file to your slave server!
8. Finally we have to unlock the tables in exampledb:
mysql -u root -p
Enter password:
UNLOCK TABLES;
quit;
Configure The Slave :
1. On the slave we first have to create the database testDB.
mysql -u root -p
Enter password:
CREATE DATABASE testDB;
quit;
2. If you have made an SQL dump of testDB on the master and have transferred it to the slave, then it is time now to import the SQL dump into our newly created testDB on the slave:
mysql -u root -p testDB < /path/to/testDB.sql (Replace with the real password for the MySQL user root)
3. Now we have to tell MySQL on the slave that it is the slave, that the master is 192.168.1.23, and that the master database to watch is testDB. Therefore we add the following lines to /etc/mysql/my.cnf:
server-id=2
master-host=192.168.1.23
master-user=slave_user
master-password=secret
master-connect-retry=60
replicate-do-db=testDB
4. Then we restart MySQL:
/etc/init.d/mysql restart
5. Finally, we must do this:
mysql -u root -p
Enter password:
SLAVE STOP;
6. In the next command (still on the MySQL shell) you have to replace the values appropriately:
CHANGE MASTER TO MASTER_HOST='192.168.0.100', MASTER_USER='slave_user', MASTER_PASSWORD='', MASTER_LOG_FILE='mysql-bin.006', MASTER_LOG_POS=183;
* MASTER_HOST is the IP address or hostname of the master (in this example it is 192.168.0.100).
* MASTER_USER is the user we granted replication privileges on the master.
* MASTER_PASSWORD is the password of MASTER_USER on the master.
* MASTER_LOG_FILE is the file MySQL gave back when you ran SHOW MASTER STATUS; on the master.
* MASTER_LOG_POS is the position MySQL gave back when you ran SHOW MASTER STATUS; on the master.
Note: These information you can get it by running "SHOW MASTER STATUS" on master mysql.
7. Now all that is left to do is start the slave. Still on the MySQL shell we run
START SLAVE;
quit;
If The Slave needs to be configured as a Master for some other Slave :
For doing this just one variable needs to be set in the /etc/mysql/my.cnf file
log-slave-updates
1. First we have to edit /etc/mysql/my.cnf. We have to enable networking for MySQL, and MySQL should listen on all IP addresses, therefore we comment out these lines (if existant):
#skip-networking
#bind-address = 127.0.0.1
2. Furthermore we have to tell MySQL for which database it should write logs (these logs are used by the slave to see what has changed on the master), which log file it should use, and we have to specify that this MySQL server is the master. We want to replicate the database testDB, so we put the following lines into /etc/mysql/my.cnf:
log-bin = /var/log/mysql/mysql-bin.log
binlog-do-db=testDB
server-id=1
Note: write these under [mysqld]
3. Then we restart MySQL:
/etc/init.d/mysql restart
4. Then we log into the MySQL database as root and create a user with replication privileges:
mysql -u root -p
Enter password:
Now we are on the MySQL shell.
GRANT REPLICATION SLAVE ON *.* TO 'slave_user'@'%' IDENTIFIED BY '
Note : (Replace
FLUSH PRIVILEGES;
5. Next (still on the MySQL shell) do this:
USE testDB;
FLUSH TABLES WITH READ LOCK;
SHOW MASTER STATUS;
The last command will show something like this:
+---------------+----------+--------------+------------------+
| File | Position | Binlog_do_db | Binlog_ignore_db |
+---------------+----------+--------------+------------------+
| mysql-bin.006 | 183 | testDB | |
+---------------+----------+--------------+------------------+
1 row in set (0.00 sec)
6. Write down this information, we will need it later on the slave!
Then leave the MySQL shell:
quit;
7. Take a dump of the database need to replicate(testDB)
mysqldump -u root -p
Note : (Replace
This will create an SQL dump of testDB in the file testDB.sql. Transfer this file to your slave server!
8. Finally we have to unlock the tables in exampledb:
mysql -u root -p
Enter password:
UNLOCK TABLES;
quit;
Configure The Slave :
1. On the slave we first have to create the database testDB.
mysql -u root -p
Enter password:
CREATE DATABASE testDB;
quit;
2. If you have made an SQL dump of testDB on the master and have transferred it to the slave, then it is time now to import the SQL dump into our newly created testDB on the slave:
mysql -u root -p
3. Now we have to tell MySQL on the slave that it is the slave, that the master is 192.168.1.23, and that the master database to watch is testDB. Therefore we add the following lines to /etc/mysql/my.cnf:
server-id=2
master-host=192.168.1.23
master-user=slave_user
master-password=secret
master-connect-retry=60
replicate-do-db=testDB
4. Then we restart MySQL:
/etc/init.d/mysql restart
5. Finally, we must do this:
mysql -u root -p
Enter password:
SLAVE STOP;
6. In the next command (still on the MySQL shell) you have to replace the values appropriately:
CHANGE MASTER TO MASTER_HOST='192.168.0.100', MASTER_USER='slave_user', MASTER_PASSWORD='
* MASTER_HOST is the IP address or hostname of the master (in this example it is 192.168.0.100).
* MASTER_USER is the user we granted replication privileges on the master.
* MASTER_PASSWORD is the password of MASTER_USER on the master.
* MASTER_LOG_FILE is the file MySQL gave back when you ran SHOW MASTER STATUS; on the master.
* MASTER_LOG_POS is the position MySQL gave back when you ran SHOW MASTER STATUS; on the master.
Note: These information you can get it by running "SHOW MASTER STATUS" on master mysql.
7. Now all that is left to do is start the slave. Still on the MySQL shell we run
START SLAVE;
quit;
If The Slave needs to be configured as a Master for some other Slave :
For doing this just one variable needs to be set in the /etc/mysql/my.cnf file
log-slave-updates
Thursday, April 9, 2009
Facts about India
- Chess was invented in India.
- Algebra, Trigonometry and Calculus are studies which originated in India.
- The game of snakes & ladders was created by the 13th century poet saint Gyandev. It was originally called 'Mokshapat.
- India has the most post offices in the world !
- The largest employer in the world is the Indian railway system, employing over a million people !.
- The value of "pi" was first calculated by the Indian Mathematician Budhayana, and he explained the concept of what is known as the Pythagorean Theorem.
- Until 1896, India was the only source for diamonds to the world.
- India was one of the richest countries till the time of British in the early 17th Century.
- Usage of anesthesia was well known in ancient India medicine.
Useless Facts
1. A goldfish has a memory span of three seconds.
2. A shark is the only fish that can blink with both eyes.
3. An ostrich's eye is bigger than its brain.
4. A snail can sleep for three years.
5. A cat has 32 muscles in each ear.
6. Butterflies taste with their feet.
7. The average person's left hand does 56% of the typing.
8. The sentence: 'The quick brown fox jumps over the lazy dog', uses every letter of the alphabet.
9. Women blink nearly twice as much as men.
10. The average person has over 1,460 dreams a year, 1 in 10 people dream in black and white
11. People who are snoring are not dreaming
12. Coca-Cola was originally green.
13. Your brain is almost 80% water and weighs less than your skin
14. The most powerful force in the universe is gossip.
15. Men can read smaller print than women; women can hear better.
16. The average person laughs thirteen times a day. Are you average?
2. A shark is the only fish that can blink with both eyes.
3. An ostrich's eye is bigger than its brain.
4. A snail can sleep for three years.
5. A cat has 32 muscles in each ear.
6. Butterflies taste with their feet.
7. The average person's left hand does 56% of the typing.
8. The sentence: 'The quick brown fox jumps over the lazy dog', uses every letter of the alphabet.
9. Women blink nearly twice as much as men.
10. The average person has over 1,460 dreams a year, 1 in 10 people dream in black and white
11. People who are snoring are not dreaming
12. Coca-Cola was originally green.
13. Your brain is almost 80% water and weighs less than your skin
14. The most powerful force in the universe is gossip.
15. Men can read smaller print than women; women can hear better.
16. The average person laughs thirteen times a day. Are you average?
Subscribe to:
Posts (Atom)


.jpg)