Find the answer to your Linux question:
Results 1 to 3 of 3
Ok, I set a password for my root on mysql, with the grant command. I panicked because my databases werent working because I just put a password so I logged ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Dec 2003
    Posts
    3

    I did a really stupid thing, help!


    Ok, I set a password for my root on mysql, with the grant command. I panicked because my databases werent working because I just put a password so I logged in MySQL and typed the command
    grant all on * to root identified by ' ';

    Now I cannot log in. What do I do? It gives me invalid password when i do mysql -u root -p and then i type nothing in.

  2. #2
    Just Joined!
    Join Date
    Dec 2003
    Posts
    3
    Ok, it turns out I could log in with my old password, now my new question is how do I remove the password so I can just type the command mysql?

  3. #3
    Linux Guru
    Join Date
    Oct 2001
    Location
    Täby, Sweden
    Posts
    7,578
    The most immediate thing that I can come to think of is to simply run these commands:
    Code:
    use mysql;
    update user set Password="" where User="root";
    flush privileges;
    That should do what you want. However, are you sure that you want to have a password-less login?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •