How to Reset MySQL Root Password on Windows [WORKING!!]

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hey guys welcome back to my channel in today's video i'm going to show you how to reset your mysql password without remembering your old password so watch this video till end if you really want to reset your mysql root password so let's get started so first of all you have to stop mysql services which are running under windows services if you remember while installing we have tick mark on one of the option that sql services as soon as your machine gets started so without stopping that services we can't uh do any changes on mysql okay so for stopping mysql services first of all we will go to services so just search for services and click on this services app and here you have to search for mysql so just press m and you can see here i'm getting mysql80 so depending on your version you will get over here so i'm having latest version it is showing me mysql80 so and you can see here the status it is showing as running so i have to stop this service so just right click and click on stop option okay so it is stopping the services so if services are stopped you cannot run mysql so now here you can see i'm getting option start so i have stopped my sql services so now next we are going to write a command for changing the root password so for that i'm going to just open a notepad and here i'm going to type one command that is alter user my username is root and at the rate localhost that is your running instances which is by default localhost and now you need to give password so in single quote i'm giving password as pass 123. just close the single code and put semicolon just check it out this syntax twice whether everything is properly or not so this username should be in single quote instance name should be in single code as well as your password should be in single code now you can save this file so i'm just saving this file over here so i'm giving name as change.txt okay so now command is done now i'm going to start command prompt so just search for cmd and then right click over here run as administrator it is asking me permission i'll click on yes so my command prompt has started the command which i am going to use that is mysqld it is available in mysql server bin folder so i have to change this path so quickly i'll just go to that path so i'll just go to colon program files mysql mysql server 8.0 bin and here i'm having one application known as mysqld you can see over here this application i will be using for changing my password so i'll just copy this path and on my command prompt i'm just going to write cd space and then i'm going to paste that path so you can see now my folder has been changed so now here i'm going to type a command my sql d and after this i am going to type a option hyphen hyphen defaults don't make any mistake while typing this command defaults hyphen file and here i need to give the inf file name which is nothing but mysql configuration file name and it is available in program data folder so let's again go to c colon here is my c colon but i can't see my program data folder because it is hidden folder so just go to view and click on hidden items now it is visible go to program data go to mysql mysql server 8.0 and now you can see this my dot ini file so just copy this path and go to command prompt and here paste the path so i'll just paste the path and then i'll type my dot ini and close the double quotes okay after typing this option again we have to type one more option that is the file name which is containing your command so for that i'm going to type hyphen hyphen in it and then hyphen file equal to the path where you have saved your alter command text file so here my file is there in e colon slash sunita slash change dot txt okay and after this i have to type one more option hyphen hyphen console okay so you can see here message ready for connection port number 3306 so mysql server has been started now if i open my sql command line argument or workbench i will be able to connect with my new password my new password was pass123 so let's try to see whether it is working or not your mysql server is started but as soon as you close this command your mysql will stop so you have to go to services again and start mysql server but before that let's check it out whether it is working or not so i am going to type mysql command line let me minimize this let me minimize everything and here this is what my mysql command line i'm typing pass 123 and you can see it has got connected so you can see it is accepting my new password that means my password has been changed successfully so now i'll go to my services again and i'll start mysql services so let me close all this even i'll close this command prompt and i am going again to services and here i will start my sql services so here is mysql you can see it is not running see i have close mysql services from command prompt also and here also it is not running if you want to check whether it is working or not you can just go to mysql command line again and just type your password and since services are not running so it will stop let's hit enter button so you can see it's not started so i'll start the services again you can right click and start or you can start from here also no problem so it is starting my services once again and it is showing me running i'll check it out once again so i'm starting mysql command line and here i'm typing my new password pass one two three and let me hit enter button and you can see it has connected to my sql server i hope if you are following my video you are also able to successfully reset your password without knowing your old password if yes please do comment in comment box or if you are facing any issue you can also comment in comment box i'm going to surely reply to your queries so guys if this video has helped you be sure to give like to this video also if you are new to my channel please consider to subscribe my channel thank you for watching my video till then see you in my next video till then bye bye and take care
Info
Channel: CS CORNER Sunita Rai
Views: 112,381
Rating: undefined out of 5
Keywords: how to reset mysql password, how to reset mysql password on windows, reset mysql root password windows, forgot mysql password, how to reset mysql root password, how to reset mysql root password on windows, forgot mysql root password, forgot mysql password on windows, forgot mysql root password on windows, reset mysql root password, reset mysql password on windows, reset mysql root password on windows 10, mysql password, mysql password reset, reset mysql root, mysql root password
Id: V8_fpBE9deA
Channel Id: undefined
Length: 7min 24sec (444 seconds)
Published: Sat Jun 04 2022
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.