Stuck with Access Denied for user 'root'@'localhost' - Terminal, Mac

前端 未结 3 1888
心在旅途
心在旅途 2020-12-11 17:59

I am stuck when trying to access mysql. It\'s my first time so please be patient with me.

Initially I was try to set up Ruby and Rails and everything worked perfrec

3条回答
  •  离开以前
    2020-12-11 18:54

    I had a similar issue and this worked like a charm -

    Later versions of mysql implement a newer authentication scheme, not all libraries are up to date with this. You can revert to classic authentication by adding the following entry into your my.cnf

    [mysqld]
    
    # Only allow connections from localhost
    bind-address = 127.0.0.1
    
    # Some libraries not compatible with latest authentication scheme as per the SO article [1].
    default-authentication-plugin=mysql_native_password
    

    Simply add the following in /private/etc/my.cnf

    # Only allow connections from localhost
    bind-address = 127.0.0.1

    Reference: https://www.reddit.com/r/mysql/comments/ae7rf4/access_denied_for_user_rootlocalhost_mac_os/

提交回复
热议问题