ALTER USER 'root'@'%' IDENTIFIED WITH auth_socket;ALTER USER 'your_username'@'localhost' IDENTIFIED WITH auth_socket;
复制代码
替换root为你的实际用户名
然后我们在重新实行ALTER USER 'root'@'%' IDENTIFIED WITH auth_socket BY '123456';
留意这个地方不是mysql_native_password 而是auth_socket 因为咱创建的就是auth_socket
OK 完事!