Mysql creates a new user and successfully connects to navicat

  1. For the first installation of mysql, execute mysql -u root to enter mysql
  2. Modify encryption rules: ALTER USER 'root'@'localhost' IDENTIFIED BY 'password' PASSWORD EXPIRE NEVER;
  3. Update user password: ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password';
  4. Create a new user and modify the encryption rules and password: CREATE USER 'john'@'localhost' IDENTIFIED BY '123456';

Guess you like

Origin blog.csdn.net/lystest/article/details/125140951