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

Change password for root user in MySQL Server

Scenario:

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

Solution:

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

15 comments:

  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.

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

    ReplyDelete
  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.

    ReplyDelete
  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.

    ReplyDelete
  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.

    ReplyDelete
  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.

    ReplyDelete
  7. When you buy an offset smoker it’s suggested to be seasoned properly rather than typical cleaning prior to your first cook. The process of seasoning an offset smoker is just like the seasoning of grills or camp ovens, need to create an oil-coated protective layer to prevent it from dust and rust. Although, some people take it casually and ignore offset smoker seasoning or some of them do not do it properly. You can click on our website to know how to season an offset smoker?

    ReplyDelete

  8. Vehicle air conditioning is important. It will help keep you cool on journeys in the summer but make sure your windscreen does not fog up in the winter months or when it’s raining. There are times that the air conditioning unit stops working or becomes inefficient, which is where we can help. The Servicing Master UK Ltd in Reading offers a full air conditioning service. If you want a quote or need more information, please contact us today. air conditioning repair reading

    ReplyDelete
  9. Are you tired of going to the garage to fill up the tires of your vehicle? Are you looking for the best ac/dc tire inflators that can provide you a great ease of comfort? Then, here you go to. This article will discuss the best tire inflators of 2021 which you shouldn’t ignore.

    ReplyDelete
  10. It’s the most wonderful time of the year... to sell? Winter can be a great time to sell your home. Especially since “winter” doesn’t dip too far below 50 degrees here. Just like with any season, there are pros and cons to selling your home in the winter and tips that may be able to help with a successful sale. homesweethomesfl

    ReplyDelete
  11. If you’ve been contemplating whether you should sell your home now or wait until the holidays wind down, we've made a list of 5 things that will help you sell your home before the first April showers.
    homesweethomesfl

    ReplyDelete
  12. Why choose the HID bulb instead of the traditional bulb? That was one of the major concerns of the users while we conducted the survey. Now, let’s come straight to the point, the traditional bulbs are not as bright as the HID bulbs, they are less effective too. Now read more about Best HID Kits here.

    ReplyDelete
  13. In order to help and encourage the government to reduce CO2 emissions by 25% by the end of 2020, all kinds of different measures are included in the 40-point plan. From large and expensive measures to simple ones that are easy and quick to implement. One of those measures, number 27, is to bring the tires up to the right pressure. https://www.coolado.com/

    ReplyDelete