Under the mac install mysql8.0

There are two installation ways, one is the installation package, official website to download the installation package, MySQL download ;

Here record brew Installation:

  1.brew uninstall mysql uninstall the original;

  2.brew install mysql

  3. You can view the mysql related by brew info mysql, there are two start-up mode, mysql.service start / brew services start mysql;

  4.mysql -uroot entering and modifying passwords, ALTER USER 'root' @ '%' IDENTIFIED WITH mysql_native_password BY 'root'; (after introducing mysq_sercuity 5.7)

  5. because the password is too short, you can view and modify the password validation rules:

  show variables like 'validate_password%';
  set global validate_password.length = 1;
(There are differences between the parameter name mysql versions, such as 5.7, compared with validate_password_length)
  set global validate_password.policy=LOW;
  

  Rules Reference

  

Guess you like

Origin www.cnblogs.com/qq1069284034/p/11498405.html