Error 1045 when using MySQL under Mac (28000): Access denied for user ' root ' @ ' localhost ' (using password:no) errors
Root user can not log in, according to the method of the online test, always reach the results
The approximate method is to boot into safe mode and then
Workaround:
To start mysq in Safe mode:
/usr/bin/safe_mysqld--skip-grant-tables &
>use MySQL
>update User Set Password=password ("New_pass") where user= "root";
>flush privileges;
Note that to use Password=password ("New_pass"), you cannot use password= ' new_pass ' directly, otherwise you will reject the connection in the new version of MySQL.
Many articles are not the last sentence, so I have to follow the way to go, so the exit security mode always solve the problem, password function is critical, set up to check the discovery password is encrypted, so you write in clear text, the system according to the encryption read, the result is never wrong
Configure MySQL summary under Mac