CrazyEngineers
  • How to reset SQL root password

    as_nawin

    as_nawin

    @as-nawin-adRdf9
    Updated: Oct 22, 2024
    Views: 955
    Lost your MySQL root password? Resetting MySQL root password is simple. Please follow these steps-

    # Login to your MySQL server.
    # Locate the mysql.ini file.
    -This should be something like C:\MySQL\my.ini or “C:\Program files\MySQL\bin\mysqld-nt.exe” –defaults-file=”C:\Program files\MySQL\Data\my.ini” MySQL
    -You can also check this by viewing the Properties of the MySQL service command line under the Services MMC.
    # Edit the appropriate *.ini file and add the following line immediately after [mysqld] ;
    skip_grant_tables = 1
    # Restart the MySQL service. Please note that MySQL is now running unsecured.
    # From a command prompt, change to the /bin directory (Ususally C:\MySQL\bin or whereever under MySQL installed location) and enter the following command to login as root:
    mysql -u root
    # Then input the following command:
    update mysql.user SET Password = Password(’newpassword’) WHERE User=’root’;
    # Now remove the line you added to my.ini in previous step and restart MySQL.
    # Make sure you can login to MySQL using the updated password.
    0
    Replies
Howdy guest!
Dear guest, you must be logged-in to participate on CrazyEngineers. We would love to have you as a member of our community. Consider creating an account or login.
Replies
  • safwan

    MemberOct 17, 2009

    I think this should come in CS section.
    Are you sure? This action cannot be undone.
    Cancel
Home Channels Search Login Register