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

前端 未结 9 1565
广开言路
广开言路 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:14

    The mysql command by default uses UNIX sockets to connect to MySQL.

    If you're using MariaDB, you need to load the Unix Socket Authentication Plugin on the server side.

    You can do it by editing the [mysqld] configuration like this:

    [mysqld]
    plugin-load-add = auth_socket.so
    

    Depending on distribution, the config file is usually located at /etc/mysql/ or /usr/local/etc/mysql/

提交回复
热议问题