Tuesday, January 30, 2007

Forgot mysql root pass ?

Recently forgot mysql root password for one of the servers i maintain . Little bit googling helped me to reset the password .
Just copy pasted the tutorials i saw so that i need not google again .

If you have set a root password, but forgot what it was, you can set a new password with the following procedure:

  1. Take down the mysqld server by sending a kill (not kill -9) to the mysqld server. The pid is stored in a `.pid' file, which is normally in the MySQL database directory:
    shell> kill `cat /mysql-data-directory/hostname.pid`
    You must be either the Unix root user or the same user mysqld runs as to do this.
  2. Restart mysqld with the --skip-grant-tables option.
  3. Set a new password with the mysqladmin password command:
    shell> mysqladmin -u root password 'mynewpassword'
  4. Now you can either stop mysqld and restart it normally, or just load the privilege tables with:
    shell> mysqladmin -h hostname flush-privileges
  5. After this, you should be able to connect using the new password.
Alternatively, you can set the new password using the mysql client:
  1. Take down and restart mysqld with the --skip-grant-tables option as described above.
  2. Connect to the mysqld server with:
    shell> mysql -u root mysql
  3. Issue the following commands in the mysql client:
    mysql> UPDATE user SET Password=PASSWORD('mynewpassword')
    -> WHERE User='root';
  4. After this, you should be able to connect using the new password.
  5. You can now stop mysqld and restart it normally.

Friday, January 19, 2007

Quiz is finally over :) :)

If at all if someone gives me the right to scrap three events from pragyan i will surely opt for junkyard wars, technical quiz and udaaan . These three are actually very good events when you are a participant. But when if you are the one who is responsible for the quiz software for these events, that too with all three events starting one after another , surely you will go mad.

Everything started when i made a foolish decision to attend a delta meeting . The meeting is to discuss about delta induction. I was trying to make a quiz manager at that time ( inspired from manu's quiz manager ) and thought i will do one for delta induction, which can be used for pragyan also . ( never realized this was such a big blunder ) . Somehow managed to changed few things in manu's code and finished the delta inductions.

The whole headache started few days before pragyan . All three event manager contacted us few days before their events. Actually i was kind of shocked by what they asked me . One wants a timer while the other says i dont need a timer :( :( . Err what is your fscking problem if there is a timer :(.

The worst part i did not code a single line in the pragyan quiz manager :( . It is coded by one of my junior and i saw the code just 3 hrs before the event. Of course i went mad , called up my junior every now and then asking to explain about what the code actually does.

Finally junkyard wars started 4 hrs late , udaan 5 hrs late and tq some 14 hrs late :P

Took a resolution that will never take up any more work in pragyan :( .

Tuesday, January 16, 2007

Pragyan '07

The big event is gonna start soon !!!

"So where will you be from
February 1 - 4 ?" .

Thats what the website says :).

I am doing bytecode and quiz management this time :) . Bad that i could not do anything for dalal this time :( .

Allergic to Allergy test :(

Met a doctor for my sinus problem few days back. He said that a small surgery has to be done, but even before that he wanted to me to take an allergy test so that he can find what all things i am allergic too.

All he said was that they will do something to your hand . With my very little biology knowledge ( actually i managed to pass my 12th bio ), i assumed that they will test whether dust is allergic to me ( coz that's the only allergic agent i could remember at that time ) . I assumed that they are gonna put some dust in my hand and somehow test whether i am allergic to that .

But the lady in the lab had different plans . She took 5 syringes . I was really sorry for the person who is gonna have those injected . I never liked injections , just because you know it is gonna pain and no way you can stop that :( .

That lady took a box which had around 50 small small bottles and asked me to show my hand. Now i realised that one of the injections among the 5 she had was for me . Ok i had no other option now . I cant run away from the lab saying i hate them . Anyway they looked small , so i was OK with them :)

34 bottles in the box she had were arranged properly as 8 , 8, 5, 5, 8 in each row . The rest of them were scattered . There was strange feeling that she is gonna inject them all to me , but thought she will mix everthing and give it in one single injection.

To my horror, she used the first syringe to inject medicines from the 8 bottles from the first row one by one . At the end of 8 injections ( within 45 seconds ) i thought it is going to be over and i can leave.

But no , she opened the next syringe and started with the next row. I was kind of shocked now and the slightest thought of all 5 syringes injected to me almost gave me an heart attack . But i thought no one will be cruel enough to do that and after the second row ( that makes 16 injections ) , she will let me go.

I almost fainted when she opened the third syringe. I stopped her and asked whether she is going to inject all these . She said "YES".

Finally she was kind of enough to reduce the number of injections by 2 ( thank god i did not have dog in my house , so those test is not required it seems )

Within 3 minutes , 32 injections. That is really a record for me . Finally realised what an allergy test is ( my bio knowledge atleast improved ) . :(

Note :: It might be funny when you read this , but if you are gonna take an allergy test , certainly it wont be that much fun . So stop laughing and get back to work :-) .