Access denied for user 'root'@'localhost' (using password: YES) after new installation on Ubuntu

前端 未结 8 929
一个人的身影
一个人的身影 2020-12-04 06:09

Today I did a login as root into Ubuntu 14.04.1 LTS ll

and then apt-get install mariadb-server (without sudo but as root).

With mySQL -h l

8条回答
  •  广开言路
    2020-12-04 06:17

    System like Ubuntu prefers to use auth_socket plugin. It will try to authenticate by comparing your username in DB and process which makes mysql request; it is described in here

    The socket plugin checks whether the socket user name (the operating system user name) matches the MySQL user name specified by the client program to the server, and permits the connection only if the names match.

    Instead you may want to back with the mysql_native_password, which will require user/password to authenticate.

    About the method to achieve that, I recommend this instead.

提交回复
热议问题