Error Number 1045.
Access denied for user 'root'@'localhost' (using password:NO)
I encountered this error during the time I'm setting up PHP, Apache, & MySQL. I get stocked with MySQL installation part because of that error you saw above. I seek various solution throughout the web but it seems many haven't tried this alternative solution that I kinda discovered.
If you're using Microsoft Windows 7 OS, then the steps below could be the solution to your MySQL Error Nr. 1045:
1) Uninstall MySQL5.X.X
Access the directory location where you've installed MySQL5.X.X (in time of uninstallation, some of the configuration settings are still left stored on the location where you've installed MySQL5.x.x even though you've uninstalled it). In my case, by default, It was installed in my Local Disk (C:)/Program Files [CLICK SCREENSHOT BELOW TO ENLARGE]
2) Inside (C:)/Program Files, look for "MySQL" folder. Delete it. [CLICK SCREENSHOT BELOW TO ENLARGE]
3) Now, get back to (C:)root, access the "ProgramData" folder. This "ProgramData" is a hidden folder so you will need to configure first the folder properties for Windows 7 (for more info check the tutorial: How to Show Hidden Files in Windows 7).
Now, access hidden "ProgramData" folder. [CLICK SCREENSHOT BELOW TO ENLARGE]
4) Inside the "ProgramData" folder, look for "MySQL" folder. This "MySQL" folder contains stored data such as password applied during the configuration. Delete it. [CLICK SCREENSHOT BELOW TO ENLARGE]
5) After all the tweaky steps. You may now install again your MySQL5.X.X.
Hope that solve your problem if you're installing MySQL in Windows 7 OS.
^_^
Other Tips/Reference:
- I would recommend this guide because I find it useful:
"Learn how to Install Apache, PHP, MySQL and phpMyAdmin" by Bicubica.com




Thank you very much, it was the hidden folder after all :) Mirek
ReplyDeleteAfter hours of trying, this was the fix that done the job. I thank you.
ReplyDelete@Mirek and @Anonymous_September 22, 2011 10:29 AM
ReplyDelete~
I'm glad my post really helps.
I thank both of you for reading.
^_^
Thank you SO much! I tried reinstalling this so many times... but always got this error. The only thing I failed to delete every time was the mysql folder in programdata. You saved me from more frustration! Thanks again ^^
ReplyDeleteTHX
ReplyDeleteThis fix works perfectly for me. Very clear, idiot-proof instructions.
ReplyDeleteThanks for your time in posting this solution.
thax dear... its work... love u..
ReplyDelete@Anonymous_October 22, 2011 10:39 AM
ReplyDelete@Anonymous_November 3, 2011 2:25 PM
@Anonymous_November 10, 2011 11:29 PM
@gabru_January 5, 2012 9:35 AM
^ Thank you so much guys. I'm really glad I did help with idiot-proof instructions like "Anonymous_November 10, 2011 11:29 PM" said. Thanks. Thanks. Happy New Year to all of you!
^_^
thank you,thank you,thank you,thank you,thank you,thank you,thank you,thank you,thank you,thank you, so much....
ReplyDeleteThanks!! that worked
ReplyDeleteError 1316 is an irritating installation error. It pops up when a software is being installed, uninstalled or repaired on your computer.You may get the following description while seeing this error: Error 1316: "A network error occurred while attempting to read from the file: :\Install.msi"
ReplyDeleteThank you. It helped me. Thanks a lot
ReplyDeleteWorked perfectly! Thank you!
ReplyDeletethanx man ..you are unmatchable
ReplyDeleteworked perfectly, great discovery, you are invincible...
ReplyDeletethanks it helps a lot
ReplyDeletethanks! very good...
ReplyDeleteThankyou soooooooooooooooooooooooooooooooo very much... where was this hidden... Thanks a lot...
ReplyDeleteFinally overcomed my frustration...
hey, hi dear... u r really genious man... thaks a lot my dear... luv u... tc... hav a wonderful journey of lyf,,, thnx 1 again......
ReplyDeleteThank you so much for this neat posting.
ReplyDeletegreat!!!!
ReplyDeleteSir I am very very thankful of u...
ReplyDeletefinally u solved my problem..
i was facing to this prob from last 7 days..
really genious person..hv a wonderful life..
take care
n thanks again
Thank you very much. You saved my life. :)
ReplyDeletethank you so much!! This was the only solution that fixed the error 1045. you do really hit the target!!!!!!!
ReplyDeleteSAML
Haiti
Thank you very much.. I searched a lot for this issue and finally done with it. It helped me a lot.
ReplyDeletehats off to u dear.thank u so much
ReplyDeletef-ing rock dude. Thanks!
ReplyDeletegreat work dude
ReplyDeleteThank You Very Much!!!!!!!!!!!!!! u ROCK!
ReplyDeletethank u so much!!!it helped me and successfully worked
ReplyDeleteThank you so much...
ReplyDeleteGreat work admin...i really wasted 1hr to solve this issue. thank you so much.
ReplyDeletethanks a lot u saved me from more frustration.
ReplyDeleteThank u so much.
ReplyDeleteIt works fine.
--Shivang Modi.
Dear, thank you soooooooooooooooooooooooooooooooooo much
ReplyDelete!!
Thank you!
ReplyDeletethanks a lot babe
ReplyDeletethank you
ReplyDeleteThanks so much ... I had been trying to fix this error for last one hour .... your blog post just made my day ... I have successfully installed MySQL Server on Windows 7....
ReplyDelete