Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 549523
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T11:11:36+00:00 2026-05-13T11:11:36+00:00

How can I change the password for root user of MySQL to null —

  • 0

How can I change the password for root user of MySQL to null — meaning no password or '' — from the MySQL command line client?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T11:11:37+00:00Added an answer on May 13, 2026 at 11:11 am

    You can recover MySQL database server password with following five easy steps.

    Step # 1: Stop the MySQL server process.

    Step # 2: Start the MySQL (mysqld) server/daemon process with the –skip-grant-tables option so that it will not prompt for password.

    Step # 3: Connect to mysql server as the root user.

    Step # 4: Setup new mysql root account password i.e. reset mysql password.

    Step # 5: Exit and restart the MySQL server.

    Here are commands you need to type for each step (login as the root user):

    Step # 1 : Stop mysql service

    # /etc/init.d/mysql stop
    

    Output:

    Stopping MySQL database server: mysqld.
    

    Step # 2: Start to MySQL server w/o password:

    # mysqld_safe --skip-grant-tables &
    

    Output:

    [1] 5988
    Starting mysqld daemon with databases from /var/lib/mysql
    mysqld_safe[6025]: started
    

    Step # 3: Connect to mysql server using mysql client:

    # mysql -u root
    

    Output:

    Welcome to the MySQL monitor.  Commands end with ; or \g.
    Your MySQL connection id is 1 to server version: 4.1.15-Debian_1-log
    Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
    mysql>
    

    Step # 4: Setup new MySQL root user password

    mysql> use mysql;
    mysql> update user set password=PASSWORD("NEW-ROOT-PASSWORD") where User='root';
    mysql> flush privileges;
    mysql> quit
    

    Step # 5: Stop MySQL Server:

    # /etc/init.d/mysql stop
    

    Output:

    Stopping MySQL database server: mysqld
    STOPPING server from pid file /var/run/mysqld/mysqld.pid
    mysqld_safe[6186]: ended
    [1]+  Done                    mysqld_safe --skip-grant-tables
    

    Step # 6: Start MySQL server and test it

    # /etc/init.d/mysql start
    # mysql      
    ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO) 
    # mysql -u root -p
    

    Source: http://www.cyberciti.biz/tips/recover-mysql-root-password.html

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

How can I change the root password to an empty one in MySql? The
I want a form where user can change password. I am able to encrypt
How do I change my user's password with the ASP.NET configuration Tool? I can't
I changed my mysql root user to have a password. Now I am working
How can I change password of the mail account using php. I am using
how can i change password manual directly in table membership? passwordformat=1, so how can
I have installed MySQL server 5 on redhat linux. I can't login as root
I'm building a password manager in PHP where the user can store and access
We are writing a user management module where the admin can change passwords for
I have long since forgotten the password for the root user on one of

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.