Transcript for:
Resetting MySQL Root Password Guide

Hi everyone, in this particular video we are going to discuss how to reset MySQL root password in your Windows operating system. To reset MySQL root password for your MySQL workbench, you have to do a very three step process. First of all, you need to have your services stopped. So what we are going to do is we are going to search for services. So if you search for services, go a little bit down and search for MySQL. Ok, so I have just run MySQL and I have got MySQL 80. So make sure to stop this service. So I am going to stop this service. Second important step is to create a file. So open any location. So let's say I have opened a location on my desktop that is a new folder and in this location I am going to create a new file. you can just mention any file name whatever you like so let's say i just name the file as password dot txt okay any name whatever you prefer you can just write it down anything xyz okay now in this particular file what you have to do is you have to write down certain thing and what is that thing you have to write down a command to read reset the password so to reset the password I am going to use something called as a alter command so I write down alter user root at the rate localhost identified by password so this password could be anything okay if you want to set the password as 12345 you can just provide the password as 12345 okay now next thing which is very important is to save this to make sure that we have saved the file now do a very simple step so once the file has been created so open your C drive or any drive where you have installed the MySQL so I have installed MySQL here go in program file search for MySQL go into this MySQL server then copy this location of bin ok so go inside this bin location and copy the same path so what I have done I have copied the path and the path is this one c in the c folder we have program file mysql server and then the bin folder so open your command prompt and make sure just to write down cd and copy paste the location to copy paste the location that you have copied is using a right button so just put a right button of your keyboard of your mouse and it will just copy the location and put enter now in this particular location we have to run a file and what is that file so see in your mysql you have a folder that is called program data so might be you can find out the program program data folder here if you are not able to find it here it's a hidden folder so you can simply go to view and you can click on hidden items so once you click on hidden items once you go on view and click on hidden items you will find out there is a folder called as program data so go inside this program data folder go into mysql then go to mysql server 8.0 and now what you have to do is you have to use this file that is called my file ok now what we are going to do we are going to run this my file into my command prompt so in case if you haven't open your command prompt make sure to open it in a command in administrative mode and run the following things so write it down mysqld hyphen hyphen default hyphen file then equal to double quotes and the location and what is the location right now that is this bin folder ok sorry I have not copied paste the location so make sure to copy paste the correct location so that is this folder mysql 8.0 and in this mysql 8.0 what is my file name my dot in ini so you can just also put my dot ini and you can just copy the complete location here okay now the next thing which is very important like once you have given the file of this mysql data folder now you have to also run Again, hyphen, hyphen, init, hyphen, file equal to the new file. So, this new file where you have set the password. So, you need to copy the same location once again. And make sure to provide the file name as xyz. Copy it. Okay. And then try to paste it. So, in the double. Just try to make sure to copy paste this and write down in the last as console. Pardon me just a second. ok so see it gives me an error that is permission denied because I have not run it using administrator just to make sure so just I am copying I have copied paste the same location for me and I am going to open this command prompt using administrator so make sure to run this command prompt as administrator Ok and I will just do a very simple thing for you guys. So I have already copied paste the location. So I will go into the C folder once again. CD and the copy paste and done. Ok. So see now it is just restarting all my services and once all the services has been done so it will help me to restart the MySQL with the new password that we have set and what is the password that we have set 1, 2, 3, 4. Okay so you can just check it. So in the file xyz.txt we have set the password as 12345. So what we can do now we can login with the new password and we can check it. Now to check it so either you can check it on your mysql. So already we have the mysql workbench. So either I can open this one or either I can open the command line both are absolutely correct to me. Ok. Now if you are just trying to make a connection it may give you an error. Why it may give you an error? Because might be you have not started with the MySQL 80 services. So again just open this MySQL 80. Again start the services and once the services has been. start so then you are ready to go and just let's try to check the password now if I just try to put the password once one two three four five and if I click on ok so you see I am I am able to log into my my sequel okay so that is the one thing how you can reset the password of your my sequel workbench or your my sequel root user in Windows so I hope you have enjoyed the video to make sure So you just follow all this step along with the video and if you feel any sort of issues feel free to ask me in the comment section. And see you tomorrow till then have a great day enjoy bye bye.