Thursday, February 10, 2011

Inspiration

1. Start working to fulfill your dreams otherwise someday somebody will put you on work to fulfill their dreams.

2. The roots of all goodness lie in the soil of appreciation for goodness.(~ Dalai Lama)

3. Next to excellence is the appreciation of it
(~ William Makepeace Thackeray)

4. All life is an experiment. The more experiments you make the better.

5. Any idiot can face a crisis - it's day to day living that wears you out.

6. An airplane is Always Safe at Ground.But Its not Made 4 That. So Always Take Some Meaningful Risks in Life To Achieve Great
Pleasure

Wednesday, May 12, 2010

Why Some People Seem To have all `Luck`

Why do some people have all the luck while others never get the breaks they deserve? Mr. Richard Wiseman set out to examine luck ,10 years ago. Why are some people always in the right time. while others consistently experience will fortune? He placed advertisements in national newspapers asking for people who felt consistently lucky or unlucky to contact him.

Hundreds of extraordinary men and women volunteered for his research and over the years, have beed interviewed by him.

He have monitor their lives and had them take part in experiments. The result reveal that although these people have almost no insight into the causes of their luck, their thoughts and behaviour ane reponsible for much of thier good and bad fortune. Take the case of seemingly chance opportunities.Lucky people consistently encounter such opportunities, whereas unlucky people do not. thier perfect partner and so miss opportunities to make good friends.They look through newspapers determined to find certain types of job addvertsement and miss other types of jobs.

Lucky people are more relaxed and open, and therefore see what is there rather than just what they are looking for.His research eventully recealed that lucky people generate good fortune via four principles. They are skilled at creating and noticing chance opportunities,make lucky decisions by listening to thier intuition,create self-fulfilling prophesies via positive expectations, and adopt a resilient attitude that transforms bad luck into good.

He wondered towards the end of the work, whether these principles could be used to create good luck, He asked a group of volunteers to spend a month carrying out exercises designed to help them think and bahave like a lucky person.Dramatic results! These exercises helped them spot chance opportunities, listen to their intution, expect to be lucky, and be more resilient to bad luck. One month later, the volunteers returned and described what dramatic:80% of people ware now happier, more satisfied with their lives and perhaps most important of all,luckier.
The lucky people had become even luckier and the unlucky had become luck. Finally He found the elusive `Luck Factor`

i) Listen to your gut instincts .(they are normally right).

ii) Be open to new experiences and breaking your normal routine

iii) Spend a few moments each day remembering things that went well.

iv) Visualise yourself being lucky before an important meeting or telephone call.



"Have a Lucky day and work for it !!! "

Saturday, October 11, 2008

Reset Mysql password on Linux system

1. Stop Mysql If it is runnung ...
# service mysqld stop


2.Run Mysql With Skip Grant Table option...
# mysqld --skip-grant-tables -u root &

3.Connect With Mysql Client...
# mysql -u root

4.Change The Password and exit...
mysql> update mysql.user set password=PASSWORD('sushil') where user='root';
Query OK, 3 rows affected (0.03 sec)
Rows matched: 3 Changed: 3 Warnings: 0

mysql> flush privileges;
Query OK, 0 rows affected (0.03 sec)

mysql> exit
Bye


5.Stop Mysql ...
# service mysqld stop


6.Start Mysql As Normal (without skip Grant table option)...
# service mysqld start
Starting MySQL: [ OK ]


7.Connect With Mysql Client...
# mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.0.51a Source distribution

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> exit
Bye


You have done it , Enjoy the Mysql :)

Monday, September 22, 2008

Reset Linux Password

Please note that you cannot perform this remotely, you must be physically at the machine!!!

1. the first step is to reboot server.
2. Since the server i inherit has GRUB, wait until the grub splash screen comes on and hit the letter 'e' on your keyboard. this will stop grub.









3. hit 'e' again and this will take you to another screen
4. you should see one of the choices has "kernel" select the one with "kernel
5. hit 'e' on your keyboard
6. type ' single' (make sure to include a space before "single") and hit enter. then enter 'b' to boot.
7. your system should boot up in single mode as root
8. now that you are logged in single mode you can chage the root password by sending this command:
Code: passwd

9. after you have changed the root password, reboot server and you should be able to login with the new password.

DONE

LILO ----------------------------
1. If you have LILO, its different, fist reboot server and when you see the LILO: prompt type "linux single" and hit enter. this will log you in as root in single user mode.
2. Once booting is complete, you can change your password with this command:
Code:

passwd

and reboot server.

DONE

Running more than one mysql on same systen

1. Extract mysql code. 
2. Create folder for containing all files for new mysql server 
   folder path= /home/mysql_instances/slaves/slave3320/mysql/
3. ./configure --prefix=/home/mysql_instances/slaves/slave3320/mysql/ --with-federated-storage-engine
4. Make
5. Make install
6. Go to /home/mysql_instances/slaves/slave3320/mysql/bin
7. ./mysql_install_db --basedir=/home/mysql_instances/slaves/slave3320/mysql/
8. Go to directory /home/mysql_instances/slaves/slave3320/mysql/var/
9. cp /usr/src/redhat/SOURCES/mysql-5.0.67/support-files/my-medium.cnf ./my.cnf
10. vi my.cnf
11. Set server/client port as 3320
12. set server/client socket path as /home/mysql_instances/slaves/slave3320/mysql/var/mysql.sock
13. cd /home/mysql_instances/slaves/slave3320/mysql/libexec
14. ./mysqld --defaults-extra-file=/home/mysql_instances/slaves/slave3320/mysql/var/my.cnf --skip-grant-tables -u root &
15. cd /home/mysql_instances/slaves/slave3320/mysql/bin
16. ./mysql -S /home/mysql_instances/slaves/slave3320/mysql/var/mysql.sock 
17. on the mysql prompt run following query
    update mysql.user set password=PASSWORD('') where user='root';
    flush privileges;
It will set password for root on the mysql server.
18. Kill mysqld server 
19. run mysqld server again as 
    ./mysqld --defaults-extra-file=/home/mysql_instances/slaves/slave3320/mysql/var/my.cnf -u root & All has been done, you have new instance of mysql running on defined port 3320 
20. access mysql server running on port 3320 by socket file
  /home/mysql_instances/slaves/slave3320/mysql/bin/mysql -S /home/mysql_instances/slaves/slave3320/mysql/var/mysql.sock -u root -p
enter your new password 

:-)