MAC recording system environment is configured

 

Install mysql

 

brew install mysql

 

 

We've installed your MySQL database without a root password. To secure it run:

    mysql_secure_installation

 

MySQL is configured to only allow connections from localhost by default

 

To connect run:

    mysql -uroot

 

To have launchd start mysql now and restart at login:

  brew services start mysql

Or, if you don't want/need a background service you can just run:

  mysql.server start

 

 

Safety Mode

mysqld_safe --skip-grant-tables

 

Can no password mysql

mysql -uroot -p

 

Change mysql password

update user set authentication_string='' where User='root';

 

 

 

Guess you like

Origin www.cnblogs.com/bandbandme/p/11607832.html