Find the answer to your Linux question:
Results 1 to 7 of 7
Hi I was trying to change the user table of my MySQL server so that any host could connect, not just the localhost. Well, I'm an idiot. I changed the ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Mar 2005
    Posts
    20

    MySQL Headache.... can't connect


    Hi

    I was trying to change the user table of my MySQL server so that any host could connect, not just the localhost. Well, I'm an idiot. I changed the field in my admin row to "_" instead of "localhost".... thinking that "_" is a wildcard that would allow any IP to connect. Now I can't connect at all. Not with localhost, not with ANY host. I'm ****ed.

    How do I change the host back to "localhost" if I can't connect to the server anymore????

    Alexandre

  2. #2
    Linux Guru sdousley's Avatar
    Join Date
    Feb 2004
    Posts
    1,790
    Not really the ideal situation to be in, but (on my computer) the mysql databases are stored in /var/lib/mysql/<dbname> so u should be able to go into the mysql database and edit the user table, though not 100% guaranteed to work, but then what u got to lose? The only other way i can think (myself) would be to reinstall MySQL, so what's wrong with tryin a fix 1st?! lol
    "I am not an alcoholic, alcoholics go to meetings"
    Registered Linux user = #372327

  3. #3
    Just Joined!
    Join Date
    Mar 2005
    Posts
    20
    Not working....
    there's a couple different files though....

    user.frm
    user.MYD
    user.MYI

    I edited MYD and it didn't work. Any ideas?

    Alexandre

  4. #4
    Linux Guru sdousley's Avatar
    Join Date
    Feb 2004
    Posts
    1,790
    Did the other 2 files have anything in there about it? If they dont work, i can pm u my 3 user files (with pw's taken out if u want?)
    "I am not an alcoholic, alcoholics go to meetings"
    Registered Linux user = #372327

  5. #5
    Just Joined!
    Join Date
    Mar 2005
    Posts
    20
    Somewhat.... some of it is unreadable....
    MYD seemed the most obvious.

    So if the password's are taken out does that mean I just set mine through mysql -u admin -p ?

    Yeah that'd be great man.
    Pretty much there were only two users:
    admin
    horde

    admin had full priviledges... I don't know about horde...

    Thanks,
    Alexandre

  6. #6
    Linux Guru sdousley's Avatar
    Join Date
    Feb 2004
    Posts
    1,790
    i will pm u my files in a sec mate.
    "I am not an alcoholic, alcoholics go to meetings"
    Registered Linux user = #372327

  7. #7
    Just Joined!
    Join Date
    Mar 2005
    Posts
    20
    YES! I got it working....

    I ended up editing my own files.....
    The trick is to make sure the formatting is consistent.... spaces between fields are important....

    One more question though:
    what do I do so that I can access MySQL from any host?

Posting Permissions

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