Connect to mysql server without sudo

后端 未结 9 1197
暖寄归人
暖寄归人 2020-12-02 08:39

The command:

mysql -u root -p

gives the error:

ERROR 1698 (28000): Access denied for user \'root\'@\'localhost\'
         


        
9条回答
  •  心在旅途
    2020-12-02 09:02

    In the comment of the question you answer you referenced, it reads

    Ok, just try to analyze all of the directories down in the path of the socket file, they need to have o+rx and the sock file too (it's not a good idea to make it modifiable by others).

    You can also try to remove mysql.sock and then restart mysqld, the file should be created by the daemon with proper privileges.

    This seemed to work for this question(the one you said you looked at) so it may work for you as well

提交回复
热议问题