-1

I update the user table of the mysql database and then I can not connect the database.when I connect the database which says:

access denied for user 'root'@'localhost' 

I update the host column of the user table,and then I can not login to the database. I can login the database before I update the user table, then I stop and then setup mysql service, I can not login.

Who can help me,any help will be appreciated.

feng smith
  • 1,487
  • 2
  • 9
  • 22
  • run >FLUSH PRIVILEGES; to reload the table or restart the database, this will also read it – Bernd Buffen Jul 07 '16 at 09:28
  • I already restarted the service. – feng smith Jul 07 '16 at 09:36
  • what do you have changed in the user table ? – Bernd Buffen Jul 07 '16 at 09:37
  • I can not remeber clearly. I may be change the host from 'localhost' to '::1''. – feng smith Jul 08 '16 at 00:49
  • @BerndBuffen thank you help me.I have solved the problem. I had mistakenly change the host from '127.0.0.1' to '::' and then I restarted mysql service.I can not connect the mysql anymore. I changed the my.ini file and add 'skip-grant-tables' then I can connect then I change the user table and everything is OK. – feng smith Jul 08 '16 at 01:28

1 Answers1

0

I have solved the problem. I had mistakenly change the host from '127.0.0.1' to '::' and then I restarted mysql service.I can not connect the mysql anymore. I changed the my.ini file and add 'skip-grant-tables' then I can connect then I change the user table and everything is OK.

feng smith
  • 1,487
  • 2
  • 9
  • 22