Mac access denied for user 'root'@'localhost' (using password: yes)

broken image

Be sure to change password to a strong password of your choosing: mysql > ALTER USER 'localhost' IDENTIFIED WITH mysql_native_password BY 'password' To configure the root account to authenticate with a password, run the following ALTER USER command. You will see that the root user does in fact authenticate using the auth_socket plugin. Next, check which authentication method each of your MySQL user accounts use with the following command: mysql > SELECT user,authentication_string,plugin,host FROM er

broken image

Open up the MySQL prompt from your terminal: $ sudo mysql If you prefer to use a password when connecting to MySQL as root, you will need to switch its authentication method from auth_socket to mysql_native_password. This allows for some greater security and usability in many cases, but it can also complicate things when you need to allow an external program (e.g., phpMyAdmin) to access the user. In Ubuntu systems running MySQL 5.7 (and later versions), the root MySQL user is set to authenticate using the auth_socket plugin by default rather than with a password.