• Home
  • Archives
  Junkman
  • HOME
  • Archives
  • ABOUT
  • Infra
  • Coding
  • Modeling
  • Archtecting

[Brew] Reset root password

Check mysqld status by brew services and stop it.

  1. brew services ls
  2. brew services stop mysql

Chckc mysqld status by lsof and stop it.

  1. lsof -iTCP:3306
  2. mysql.server stop

Reset root password by mysqld_safe

  1. mysqld_safe --skip-grant-tables
  2. switch to new terminal
  3. mysql -u root
  4. mysql> FLUSH PRIVILEGES;
  5. mysql> ALTER USER 'root'@'localhost' IDENTIFIED BY 'MyNewPass';
  6. mysql> \q
  7. mysql.server start
  8. mysql.server stop
  9. brew services start mysql
  10. mysql -u root -p
2016/10/22 posted in  OSX

« Prev Page

» Next Page

Junkman

“拾荒者”一词来自凯文・凯利的《失控》中关于机器学习的故事(“收集癖好机”如何完成他的收集工作)。
GitHub RSS

Categories

Infra Coding Modeling Archtecting

Recent Posts

  • The Art of Crafting Architectural Diagrams
  • 为什么说我们需要软件架构图?
  • DNS Servers That Offer Privacy and Filtering
  • Airbnb's Migration from Monolith to Services
  • Events As First-Class Citizens

Copyright © 2015 Powered by MWeb,  Theme used GitHub CSS.