Thursday, March 18, 2010

How to reset ROOT password for MySQL Server 5.0

  1. Stop my sql server
  2.  Start Menu -> Control Panel -> Administrative Tools -> Services  
    

    Find mysql, right click and select stop

  3. Open Command Prompt
  4.  Run -> type "cmd"  
    
  5. Execute the following command in the command prompt
  6.  cd C:\Program Files\MySQL\MySQL Server 5.0\bin  
     mysqld-nt.exe -u root --skip-grant-tables  
    
  7. Leave the current command prompt as it is, and open a command prompt window.
  8. Execute the following command in the command prompt in the second command prompt.
  9.  cd C:\Program Files\MySQL\MySQL Server 5.0\bin  
     mysql  
    
    You should have this
     C:\Program Files\MySQL\MySQL Server 5.0\bin>mysql  
     Welcome to the MySQL monitor. Commands end with ; or \g.  
     Your MySQL connection id is 1  
     Server version: 5.0.67-community-nt MySQL Community Edition (GPL)  
     Type 'help;' or '\h' for help. Type '\c' to clear the buffer.  
     mysql>  
    
  10. Execute the following command to update the password in the sql command windows.
  11.  UPDATE user SET Password = PASSWORD('NEW_PASSWORD') WHERE User = 'root';   
    
    Where 'NEW_PASSWORD' will be your new ROOT password

  12. After you are finished close the first command prompt and type "exit;" in the second command prompt windows to disconnect successfully. You can now start the MySQL service.
  13. *Note for Haslyn : Sorry, I just forgot mysql pass in your PC, so i write this for u.*

Friday, March 12, 2010

Funny Code

Once I had a junior programmer writing VB code that needed to know the day of the week. He decided to write his own code, and read something like:

if (day = 1) or (day = 8) or (day = 15) or (day = 22) or (day = 29) then
weekday = "Monday"
elseif (day = 2) or (day = 9) or (day = 16) or (day = 23) or (day = 30) then
weekday = "Tuesday"
...

Trying to be educational I asked him for his opinion about his own code, and he said that he would simply modify it every month.

– PedroChan

Java Joke

A group of computer science majors were listening to a lecture about Java programming at a university. After the lecture one of the men leaned over and grabbed a women's breast.

Woman: "Hey! That's private, OK!?"

The man hesitated for a second looking confused.

Man: "But I thought we were in the same class?"

Wednesday, March 10, 2010

10 Reasons Why You Need Java Now by Red1 (ADempire)

10 Reasons Why You Need Java Now

1. The world will end in 2012. You got to live life to the fullest.
Dying without knowing Java is like never experiencing sex.

2. Java is the defacto matured ironman of programming languages. I use
to say to my 9 year-old prodigy - If C is the mother of all languages,
then Java is its dad.

3. Java developers fetch higher pay. J2EE architects sleep on business
class flights.

4. If you are more idiot and dumb than my 9 yr-old son then u can
download from www.alice.org and learn the concepts real fast.

5. You can say this to the other gurus, "Heh.. sorry.. I am only good in
Java".

6. Top SourceForge projects such as ADempiere are prorgammed in Java.

7. Java has lots of API Libraries that are matured for the serious
industries.

8. IBM uses Java.

9. Even Sun dies after giving birth to Java. And Oracle is willing to
take over the biological son.

10. The world has only 10,000 certified Java holders. It is still a
murky blue ocean, not as saturated and cluttered as Python's 50,000 strong.

Taken from OSDC.MY mailing list.