Access denied for user 'root'@'localhost' (using password: Yes) after password reset LINUX

前端 未结 10 904
伪装坚强ぢ
伪装坚强ぢ 2020-12-08 12:20

I have a MySQL installed on my linux server, I forgot it\'s password so I went and changed it using the methods I found on the web. What I did was as follows:



        
10条回答
  •  旧巷少年郎
    2020-12-08 12:42

    You may need to clear the plugin column for your root account. On my fresh install, all of the root user accounts had unix_socket set in the plugin column. This was causing the root sql account to be locked only to the root unix account, since only system root could login via socket.

    If you update user set plugin='' where User='root';flush privileges;, you should now be able to login to the root account from any localhost unix account (with a password).

    See this AskUbuntu question and answer for more details.

提交回复
热议问题