Wednesday, April 22, 2009

How to set Root password for "WAMP"

Hello! Guys,
After installing 'WAMP' last night i face series of problems and today i want to share with you all what you should do if you face the similar problem.

  • Installation of WAMP was successful, but still web browser could not execute php code?

After installing "WAMP" i thought its nice idea to try some php code at home, rather than uploading every php file on uni server and test it. I created a folder inside www folder in C:\Wamp and put my php file in it,as written on www.wampserver.com to my surprise whenever i try to view this page in web browser, the browser did't seem to execute php code but it was showing text written with in HTML elements properly.

The reason for this behavior was my firewall block the php server, so if you guys have firewall installed on you system make your you permit php server. Don't forgot to put WAMP server online , you can do this by left clicking on wamp icon in status bar and selecting option "put online" .


  • Unable to open MySQL console?

Now, i am able to figure out how to execute php code but the problem now is whenever i try to open MySQL console it ask for an password, which i don't have.
so, now i have to set the root password but how to do that?.....
After looking around INTERNET for this. finally i found the answer which involve following steps:-

  • open the phpMyAdmin, you can do this by left clicking on wamp server icon in status bar.
  • click on the privileges tab.
  • Then look for User "root" with host "local host" click on edit privileges( which is on right end of this row).
  • scroll down to change password column and type in password twice and click go.
  • open c:\WAMP\APPS\phpmyadmin3.1.1\config.inc.php in the text editor and search for $cfg['Servers'][$i]['auth_type'] = 'config'; and replace 'config' with 'cookie'.
  • Now look for $cfg['Servers'][$i]['password'] = 'your_password'; and type in your password in between single quotes.
  • its all done...now save this file. exit WAMP server and restart it you would be able to use MySQL console now....


cheers.....

No comments:

Post a Comment