MySQL fails on: mysql “ERROR 1524 (HY000): Plugin 'auth_socket' is not loaded”

前端 未结 9 1552
广开言路
广开言路 2020-11-28 00:21

My local environment is:

  • fresh Ubuntu 16.04
  • with PHP 7
  • with installed MySQL 5.7

    sudo apt-get install mysql-common mysql-se         
    
    
            
9条回答
  •  执笔经年
    2020-11-28 01:02

    In case someone lands here after making the same mistake I did:

    1. Switched to plugin="mysql_native_password" temporarily. Performed my tasks.
    2. Attempted to switch back to the "auth_socket" plugin, but incorrectly referenced it as plugin="auth_socket" which resulted in mysql "ERROR 1524 (HY000): Plugin 'auth_socket' is not loaded"
    3. Lacking a way to login to fix this mistake, I was forced to have to stop mysql and use mysql_safe to bypass authentication in order to switch to the appropriate plugin plugin="unix_socket"

    Hopefully this saves someone some time if they receive the original poster's error message, but the true cause was flubbing the plugin name, not actually lacking the existence of the "auth_socket" plugin itself, which according to the MariaDB documentation:

    In MariaDB 10.4.3 and later, the unix_socket authentication plugin is installed by default, and it is used by the 'root'@'localhost' user account by default.

提交回复
热议问题