mac下安装mysql

一直用的docker的mysql,今天尝试在mac下安装mysql,还是踩了一些坑。

安装

brew install [email protected]

重置密码

  • brew services stop [email protected]
  • cd /usr/local/opt/[email protected]/bin
  • /mysqld_safe --skip-grant-tables
  • Command+N新开窗口
  • mysql -u root
  • use mysql;
  • update user set authentication_string = password('123456') where user='root';
  • flush privileges;
  • quit
  • brew services start [email protected]

参考文档

https://blog.csdn.net/ttdevs/article/details/52416114

https://www.cnblogs.com/gumuzi/p/5711495.html

你可能感兴趣的:(后端)