How to change Root password in MySQL Server - MySQL DBA Tutorial

Change password for root user in MySQL Server


You are working as MySQL Server DBA and you need you change the password for root. How would you do that?


You can use mysqladmin command to change the password for root user. use below statement to change the password

shell > sudo mysqladmin -u root -p password mynewpassword

Once you will hit enter, you will be asked to provide old password for root. Provide the password for root and hit Enter. 

You are all set to login to MySQL Server by using new root password. Use below command to login to MySQL Server.

shell> mysql -u root -p
provide new password, in my case it was mynewpassword. 

MySQL Server Tutorial - How to reset root user password in MySQL installed on Windows

MySQL Training for beginners - How to change root user password for MySQL Server on Linux


  1. Hey, thanks for sharing it. Sometime SQL create some errors due to backends. So you can also view how tall is travis fimmel for further information.

  2. thankyou for sharing sql knowledge with us.
    inexpensive embroidery machine

  3. Thanks for sharing. Bungee workout is becoming a trend. With so much fun, ease and benefits, it’s bound to claim a significant market share, and soon several big studios will be embracing it. You can google the places around you that are offering bungee workouts and hit the gym. Here you can find bungee fitness class near me that you may like to visit.

  4. Planning to move/shift to a new location? Are you fed up with the existing one and looking for a new residence location where you can enjoy all the services and facilities? Then house movers uae are best home movers in dubai here for you to serve the best. We can move your households and other items in the best possible manner movers and packers in dubai marina.

  5. A recycler also known as a recycler bong, is a water pipe or dab rig that consists of multiple chambers. These chambers pull smoke through and recycle it, allowing for optimum filtration and smoke production. Find that cheap dab recyclers with bulk discount and discrete packaging.

  6. Has your paintball gun stopped working all of a sudden? Or perhaps you have been using your gun for quite some time, and it will not shoot anymore. Either way, you have come to the right place. We have been using paintball guns for several years and have a great amount of expertise. There are many reasons why a paintball gun stops shooting, but not to worry. We have some very easy ways to make them shoot again as if they were just bought. Know here how fix paintball gun.