A step by step tutorial teaching you how to create your own chat client and chat server easily in C#, for local networks or the Internet.
A C# tutorial showing you how to make use of WMI to extract information on disk drives, such as model, capacity, sectors and serial number.
This tutorial will teach you how to calculate the shipping cost based on the weight, height, length and depth of the box, the distance and the UPS service type.
Creating a Rich Text Editor using JavaScript is easier to do than you might think, thanks to the support of modern browsers; this tutorial will walk you through it.
How to reset your MySQL root password under Windows |
On Saturday, September 2nd 2006 at 10:10 PM By Andrew Pociu (View Profile) ![]() ![]() ![]() ![]() (Rated 4.7 with 74 votes) |
||
|
In case you forgot the root password for your MySQL database server running under Microsoft Windows, you can still access your database and even reset your password using the command prompt. However, first you should check your my.cnf file where your password is stored.
If you are using a new version of MySQL Server, such as 5.0, the methods here might not work for you, or slightly different actions may need to be applied. 1. Stop your MySQL server completely. This can be done by accessing the Services window inside Windows XP and Windows Server 2003, where you can stop the MySQL service. 2. Open your MS-DOS command prompt using "cmd" inside the Run window. Inside it navigate to your MySQL bin folder, such as C:\MySQL\bin using the cd command. 3. Execute the following command in the command prompt: mysqld.exe -u root --skip-grant-tables 4. Leave the current MS-DOS command prompt as it is, and open a new MS-DOS command prompt window. 5. Navigate to your MySQL bin folder, such as C:\MySQL\bin using the cd command. 6. Enter "mysql" and press enter. 7. You should now have the MySQL command prompt working. Type "use mysql;" so that we switch to the "mysql" database. 8. Execute the following command to update the password: UPDATE user SET Password = PASSWORD('NEW_PASSWORD') WHERE User = 'root'; However, you can now run any SQL command that you wish. 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. Please note that the 8 step process above can differ depending on the MySQL version you are using, how you configured your server, etc. However, many times you can still easily work around a problem that you experience in any of the steps. |
|||
Digg It!
Del.icio.us
Reddit
StumbleIt
Newsvine
Furl
BlinkList
|
|||
|
|||
Current Commentsplease give me some information about ms dos copy and paste other drive
quickly
In some versions the mysqld.exe is replaced with mysqld-nt.exe.
Check to see which configuration you have!
I was running WAMP and found that for this to work I had to do the following:
1. In the WAMP control panel "STOP' mysql before running the -skip-grant-tables command on either mysqld or mysqld-nt.
2. Run the rest of this reset procedure, then close all open mysql sessions and/or command line windows.
3. In the WAMP control run "Restart All Services"
in step 6 i tried to run mysql and i got
ERROR 1045 (28000): Access denied for user \'ODBC\'@\'localhost\' (using password: NO)
several times
the second DOS page just doesnot exit. neither it quit nor exit works
This worked perfectly for me (platform Windows XP SP2)! Thanks so much Andrei for this useful article!
error 1067: The process terminated unexpetedly, while restarting mysql
Thank you soooo much!! I found many similiar articles, but this was the only one that worked prefectly, due to an excellent description. Thanks alot!!
Process works perfectly thank you
thanks a lot andrei...
keep up the good effort :)
If you get error 1067 when trying to restart, make sure the cmd prompts are closed and make sure windows task mgr does not have mysql running as a local user app.
thanks andrei for your info, worked for me!
Hello,
I just want to let you know that you told us just bullshit and C:\Program Files\MySQL\MySQL Server 5.0\bin>mysqld.exe -u root --skip-grant-tabl
es
'mysqld.exe' is not recognized as an internal or external command,
operable program or batch file.
Thank you so much, Andrei.
Been figuring this out for a night and your posting just came out today.
It\'s really very helpful!
Jackie, do you really not have the mysqld.exe under your C:\Program Files\MySQL\MySQL Server 5.0\bin ?
Do you have version 6.0, instead?
It might be resided in C:\Program Files\MySQL\MySQL Server 6.0\bin.
ERROR 1045 (28000): Access denied for user\'ODBC\'@\ 'Local host\' (using password: NO)
Please how do I Log in tp my Database Query
hi guys, i m trying to run this command:
Python manage.py sql
then, i m getting this error:
_mysql_exceptions.OperationalError: (1045, \"Access denied for user \'ODBC\'@\'local
host\' (using password: NO)\")
How, can i avoid thid error.
jackie, instead of getting obnoxious, you can see in the bin folder that the logical answer is to use mysqld-nt.exe. Andrei pointed out that the process may be different for newer versions.
Worked perfectly fine thx dude u save me a lot of time
use \'mysqld-nt.exe\' if ur using windows 2003 server
Thank you very much. This is the only way it worked easy for me.
Other posts make life so complicated !
Thank you once again
Thanks! This saved the day for me!
it worked for me,thanx alot
using 5.0 when i get to
7. You should now have the MySQL command prompt working. Type "use mysql;" so that we switch to the "mysql" database.
the ''use'' command doesnt' work..so what next
Hello !!
My Problem is the same as the problem for migboy.
I cannot even see any response to migboys query yet !!
Please any information on wat to do when use command doesnt work for mysql server5.0.
I looked into the manual where it says "USE db_name" wud be the way to go !! Nothing WORKS,.,. Please HELP ........M STUCK !!
Thank for Guide.
Thank for Guide.
This worked like a charm! Yes, there were small variations but easy to find and work with.
Thanks so much! This will be a classic solution.
This was great! I spent 'centuries' trying to find my.cnf, I didn't find it, and then I tried the next steps. It works with MySql 5.1., too.
The original 8 step plan worked.
Much better than that sh*t advice you get on the sun website.
If you were my neighbour I'd buy you brandy.
After 5 hours... finally! Thanks.
The original 8 step plan worked.
Much better than that sh*t advice you get on the sun website.
If you were my neighbour I'd buy you brandy.
After 5 hours... finally! Thanks.
U Know How I Can Get My Pass ID Back From :
SQL Server Management Studio Express!
In sql for running iReports when i click on new connection i asks me the Database Password as there is no password for Sql Server. I am getting error:
SQL problems: Access denied for user 'root'@'localhost' (using password: YES)
jdbc:mysql://localhost/mysql
also i gave IP ddress and tried out yet showning error:
SQL problems: null, message from server: "Host 'kalimulla' is not allowed to connect to this MySQL server"
jdbc:mysql://192.168.0.17/mysql
and at last i created passwrod fro root and then also it is coming error:
SQL problems: Access denied for user 'root'@'localhost' (using password: YES)
jdbc:mysql://localhost/mysql
In sql for running iReports when i click on new connection i asks me the Database Password as there is no password for Sql Server. I am getting error:
SQL problems: Access denied for user 'root'@'localhost' (using password: YES)
jdbc:mysql://localhost/mysql
also i gave IP ddress and tried out yet showning error:
SQL problems: null, message from server: "Host 'kalimulla' is not allowed to connect to this MySQL server"
jdbc:mysql://192.168.0.17/mysql
and at last i created passwrod fro root and then also it is coming error:
SQL problems: Access denied for user 'root'@'localhost' (using password: YES)
jdbc:mysql://localhost/mysql
In sql for running iReports when i click on new connection i asks me the Database Password as there is no password for Sql Server. I am getting error:
SQL problems: Access denied for user 'root'@'localhost' (using password: YES)
jdbc:mysql://localhost/mysql
also i gave IP ddress and tried out yet showning error:
SQL problems: null, message from server: "Host 'kalimulla' is not allowed to connect to this MySQL server"
jdbc:mysql://192.168.0.17/mysql
and at last i created passwrod fro root and then also it is coming error:
SQL problems: Access denied for user 'root'@'localhost' (using password: YES)
jdbc:mysql://localhost/mysql
In sql for running iReports when i click on new connection i asks me the Database Password as there is no password for Sql Server. I am getting error:
SQL problems: Access denied for user 'root'@'localhost' (using password: YES)
jdbc:mysql://localhost/mysql
also i gave IP ddress and tried out yet showning error:
SQL problems: null, message from server: "Host 'kalimulla' is not allowed to connect to this MySQL server"
jdbc:mysql://192.168.0.17/mysql
and at last i created passwrod fro root and then also it is coming error:
SQL problems: Access denied for user 'root'@'localhost' (using password: YES)
jdbc:mysql://localhost/mysql
I cant get the use command to work can someone help I need to get my dedicated host up and running plz help.
Hey, can any 1 helping me whit MSSQL Connecting...
If i go connect he says this (click link)
Picture :
http://img19.imageshack.us/img19/4204/error011001.png
Who can help me whit this problem ?
Any 1 ?
p.s. i searching full internet inc Google,Yahoo enz... but still there is nothing that i can find .
Thanx if u can help me ;P
MSN : RICKNO@LIVE.NL (ONLY ADD IF U KNOW TO FIX)
thank you, this works
thanks to whom (as i undersoot Andrei) wrote this useful information
i did and worked
i want to show time when i checked (to whom say that it is not useful)
20.05.2009
Thanks for the guide. Worked better than the guide in MySQL Reference Manual.
Hi Andrei,
I struggled to solve this issue for more than 4 hrs losing my sleep. Finally, I got this and this worked perfectly.
Thanks for posting such a step by step guide!!
Will refer to your posts when I need related info.
Gopinath.
thanks for the all for giving more and more supports
best of luck for all help full people
thanks for the all for giving more and more supports
best of luck for all help full people
Line 7 was the key step that was missing from all the other procedures I tried.
Thanx, after MANY hours, I'm reconnected to MySQL.
Jim
You sir, are my hero.
Thanks so much.. it really worked..
This work great for me! Thanks!
It worked perfectly. Thank you a lot.
Hi,
it all seems to have worked, but after step 3 the first command prompt was completely unresponsive.
And after completing step 8 the only way to exit mysqld was to use End Process in Windows Task Manager. Has anyone else encountered this problem?
Mauro
You guys may want to try this tutorial, it works for me:
http://dev.mysql.com/doc/refman/5.0/en/resetting-permissions.html
For me, it works perfectly (windows xp 32, mysql5)
I have the same problem as Mauro and am using a WAMP server.
I had set passwords in the priveleges section of PHPMYADMIN then it would not talk to me:-(
I turned on the console using --console after the command to see the error messages.
There was a repeating error message to the effect that something else was using InnoDB files
It then says shut down the program that is using the files.
Whatever that means. I shut down all the firewalls and virus software but it made no difference.
Thanks man, your article saved my homework :-) ... Thanks a lot
Thanks a lot dude :)
The best article in resetting password in mysql. others are waste shit idiot fools.
thanks this worked for me!
thanks this worked for me!
Nice article. Its help me! Thx alot Pociu
Its working well first time. I close my cmd properly but when I restart my computer then its not working!!! Please give me solution.
Its working well first time. I close my cmd properly but when I restart my computer then its not working!!! Please give me solution.
Its working well first time. I close my cmd properly but when I restart my computer then its not working!!! Please give me solution.
it looks as if this will work - at least the commands did. I did not close the dos mysqld before trying to restart the service and the i realised that i could stop the processes in task manager, now i can connect to the databases.
yours was the article that worked - you knew what to do.
Thanks
Lawrence
OK, I stopped my MySQL server and then when I go to MySQL/bin folder via MS-DOS and enter "mysql" I get this error:
Can't connect to MySQL server on 'localhost' (10061)
.. so WHAT the FUCK is GOING on HERE?
I want to know, how to change the admin password of Mysql server in wamp server. And where is mysql datbase files are stored.
Thanks
Remove all datafiles. uninstall wamp. (this will erase all data!). stop instance. remove mysql directory. that's all, you can reinstall
My XP Pro sp3 hangs with XAMPP on line 3 of your instructions....
3. Execute the following command in the command prompt: mysqld.exe -u root --skip-grant-tables
any help is always appreciated
I am a true beginner with PHP
hi,thanking you for providing this information
it really helped me alot
once again thank you
works like a gear. this is great! thank you so much.
Works perfecly thank you very much! read it carefully and you'll figure it out!
Thanks for that.
I couldnlt get it to work with the information on the MySQL Site, but this worked fine. The only problem I had was that MySQL wouldn't restart, but a reboot of the machine fixed it.
Using Windows XP SP3 and MySQL 5.1.11
WAMP is so bugged BULL SH!T use EasyPHP it's so much more simple and flexible!
Well,EasyPHP wouldn't really help, seeing as how my client is running MySQL on Windows XP....
worked a treat. great stuff thanks
worked a treat. great stuff thanks
My god tnx for this
Well,i think it can bring you some help: http://password-genius.com/
Thank you! That saved my day!
For Windows Operating System,
1. Firstly, create a text file and name it as resetpassword.txt and you may save it to C drive.
2. Enter the following word to your text file.
1.
UPDATE mysql.user SET Password=PASSWORD('root') WHERE User='root';
2.
FLUSH PRIVILEGES;
3. Stop your MySQL services as step below.
Run -> services.msc -> MySQL -> Stop
4. Open Command Prompt(cmd) and run the command as below to start the MySQL services.
1.
C:\mysql\bin\mysqld.exe --init-file=C:\\resetpassword.txt
5. Delete the file named resetpassword.txt.
MySQL sucks. Maybe postgresql?
Damn Andrew, this worked perfect. Thanks a lot.
Thanks Andrew! Saved me hours of struggle!!!!
Thank you, Thank you, Thank you!! You saved me many hours of headaches! Best explaination out there for windows....trust me! :)
Thank You So Much I wish I had found this discription first...
I have been beating my head against this on and off for quite a while using different methods.
The Absolute Best explanation I have tried 3 or 4 different answers at different times and using slightly different syntax, nothing worked. This one Worked First Try!
Tried stuffs which said they were easy but didn't work.
Tried this which looked a little long but worked!
Really glad and thank you so much! Bookmarking this!
it worked for me,
when i did
I was running WAMP and found that for this to work I had to do the following:
1. In the WAMP control panel "STOP' mysql before running the -skip-grant-tables command on either mysqld or mysqld-nt.
2. Run the rest of this reset procedure, then close all open mysql sessions and/or command line windows.
3. In the WAMP control run "Restart All Services"
This article is incomplete and could lock people out of their own phpMyAdmin panel as root user. If this is the case check out my tutorial here: http://www.itutorblog.com/2011/06/how-to-change-root-password-on-wamp/
Thanks for an excellent tutorial. Everything worked great for me until I tried Step 8. After I typed in the information for step 8 I got the following error message: ERROR 1044 (42000): Access denied for user ''@'localhost' to database 'mysql'
any help would be appreciated
thanks in advance
You have to edit the config.inc file. The second part of this tutorial: http://www.itutorblog.com/2011/06/how-to-change-root-password-on-wamp/ will explain where the config.inc file is and how to edit it. Good Luck!
How do I unsubscribe from the future replies?
Thanks so much! It really works.
Hey men thanks,
Definetely you are the dolphin of mysql
Hey men thanks,
Definetely you are the dolphin of mysql
hi
i've installed mysql-essential 5.1.33-win 32 on my PC and when i try to run the program
it asks for a password!!!
pls give me suggestions as i've not put up any password during the setup!!!!!!!
I am getting
ERROR 2003 (HY000): Can't connect to MySQL server on 'localhost' (10061)
when execute mysql
Thanks its working...
but in update command
update mysql.user .......
It was a great help.. no problem it worked like nice. Great Thanks for the help.
Time of one hour an hour later. Wen Qi Yue Ting and Xuenv found the body appeared to change, he has been practicing the whole day. And now has gone a full seven days time
thanks a lot!! amazing article.
I got he thing for getting the The height of the content area of a browser(ie viewport), but how do i get the height of the entire browser in ie8 including menubar,toolbar etc.For browser's other than ie8 this one works but for ie8 this one do not works. and I introduce your website perfect for my needs. It contains wonderful and helpful posts. I mortal listing most of them and got a lot from them. To me, you are doing the eager set. Fuddle on this. ingest at locating In the end, I would same to give you for making given a very website. Or where I could also gain several of my ranches for marketing substance for you all budy who come up here
Great Post. Worked flawlessly.
Thanx sir
simply excellent
Once you have recreated the problem and captured these steps, you can save them to a file and send it to your support person, who can then open it up and view
I just stumbled upon your blog and wanted to say that I have really enjoyed reading your blog posts.
I need to say that you are doing a fantastic job. Please keep up the great work.
Informative and interesting which we share with you so i think so it is very useful and knowledgeable. I would like to thank you for the efforts. <a href="http://www.grant-applications.org">Grant Applications
I have really enjoyed reading your blog posts.
I followed your 8 steps without any problems.
However, on the pages concerned I am syill getting the following message:
Access denied for user 'xyz_4_r'@'11.11.11.11' (using password: YES)
Can you advise?
I followed your 8 steps without any problems.
However, on the pages concerned I am syill getting the following message:
Access denied for user 'xyz_4_r'@'11.11.11.11' (using password: YES)
Can you advise?
You really make it seem so easy with your presentation but I find this topic to be really something which I think I would never understand.
Thanks dudeeeeeeeee.. it worked
Nice. This was exactly what I needed, clear, precise, and practical. Perfect!
I forgot. I wanted to point out that step 8 above was a great heads up for me - thanks!
Offshore Company In UAE.
It was fun reading it. Keep going in the good work.
They are working in all kind of project servers , Microsoft EPM , Microsot programs and Microsoft EPM
and Microsoft project 2010 , project server , project server 2010 and many more.
I hope if yo need any thing then you must contact them. Thanks
Security issues can occur anywhere, so this should come as no surprise to all the people using the operating systems you brought to discussion up here. The thing is, I choose wisely every app that I want to download, every tool, every invoice template, by checking some general info on them. Sometimes you can get to see how reliable they are in terms of security just by reading some reviews about them first.
In any review I read about operating systems, with my professional perks on MySQL, people use to show more trust to higher versions when it comes to security aspects. Some people I worked with, though, believe that the recent MySQL changes bring further advantages to database composition and structure, but the older versions were highly more reliable on security.
Passwords should be changed from time to time. This can increase computer security and of the data stored on it.
you can still access your database and even reset your password using the command prompt.
you can still access your database and even reset your password using the command prompt.This can increase computer security and of the data stored on it.
nice one i like it very much please keep posting thank you .
Thanks a lot, it works!
The thing is, I choose wisely every app that I want to download, every tool, every invoice template <a href="http://www.loanforu.co.uk">www.loanforu.co.uk</a>
Thank you so much!
just an amend :
this works for a default installation. If you have customized your installation : a different db directory or/and my.ini > it fails.
i tried to use the initial command mysqld -u root --defaults-file=.. --skip-grant-tables but it doesnt work for me.
So.. using the original solution then copying the mysql db into my customized folder.
comments welcome
james
just an amend :
this works for a default installation. If you have customized your installation : a different db directory or/and my.ini > it fails.
i tried to use the initial command mysqld -u root --defaults-file=.. --skip-grant-tables but it doesnt work for me.
So.. using the original solution then copying the mysql db into my customized folder.
comments welcome
james
Thanks a lot. Your post has been very precious to me.
Thanks a lot. Your post has been very precious to me.
Thanks a lot. Your post has been very precious to me.
Thanks a lot. Your post has been very precious to me.
Thanks a lot. Your post has been very precious to me.
Your post has been very precious to me.
just wow buddy
very nice and supportive share, it saved plenty of my time :)
thanks again
just wow buddy
very nice and supportive share, it saved plenty of my time :)
thanks again
This worked perfectly for me (platform Windows XP SP2)! Thanks so much Andrei for this useful article!
This worked perfectly for me (platform Windows XP SP2)! Thanks so much Andrei for this useful article!
perfectly for me (platform Windows XP SP2)! Thanks so much Andrei for this useful article!
Thanks worked perfectly for me.
Thanks worked perfectly for me.
Cannot connect: invalid settings.
phpMyAdmin tried to connect to the MySQL server, and the server rejected the connection. You should check the host, username and password in your configuration and make sure that they correspond to the information given by the administrator of the MySQL server.
Cannot connect: invalid settings.
phpMyAdmin tried to connect to the MySQL server, and the server rejected the connection. You should check the host, username and password in your configuration and make sure that they correspond to the information given by the administrator of the MySQL server.
Cannot connect: invalid settings.
phpMyAdmin tried to connect to the MySQL server, and the server rejected the connection. You should check the host, username and password in your configuration and make sure that they correspond to the information given by the administrator of the MySQL server.
Cannot connect: invalid settings.
phpMyAdmin tried to connect to the MySQL server, and the server rejected the connection. You should check the host, username and password in your configuration and make sure that they correspond to the information given by the administrator of the MySQL server.
Great solution,
Work very nice for me.
Thanks
Great solution,
Work very nice for me.
Thanks
Works only in some systems.....
Works only in some systems.....
Works only in some systems.....
Works only in some systems.....
Works only in some systems.....
Hiya, I am really glad I've found this info. Today bloggers publish just about gossip and this is really frustrating.
Hiya, I am really glad I've found this info. Today bloggers publish just about gossip and this is really frustrating.
this is perfect and eassy solution Thanks.........
this is perfect and eassy solution Thanks.........
this is perfect and eassy solution Thanks.........
this is perfect and eassy solution Thanks.........
this is perfect and eassy solution Thanks.........
this is perfect and eassy solution Thanks.........
this is perfect and eassy solution Thanks.........
this is perfect and eassy solution Thanks.........
this is perfect and eassy solution Thanks.........
this is perfect and eassy solution Thanks.........
this is perfect and eassy solution Thanks.........
this is perfect and eassy solution Thanks.........
this is perfect and eassy solution Thanks.........
this is perfect and eassy solution Thanks.........
this is perfect and eassy solution Thanks.........
this is perfect and eassy solution Thanks.........
this is perfect and eassy solution Thanks.........
this is perfect and eassy solution Thanks.........
I fully support all efforts to conserve, reuse and recycle – and it should be something that the whole nation should be doing – NOW!
After executing update with new password as described here, I get result message: 0 rows affected.
And after I close the server, command line client still doesn't accept new password.
Anybody have any clue?
Related Knowledge Base Articles
Related Source Code
Related Tutorials
MySQL Job SearchFrom the creators of Geekpedia, a revolutionary new coupon website!
BargainEZ has coupons codes, printable coupons, bargains and it is the leading source of Passbook coupons for iPhone and iPod touch devices.