3
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Mac OS Xでmysqlのパスワードを消去する方法

Last updated at Posted at 2017-03-01

brew install mysqlでインストールしたmysqlのパスワードを消去する方法
時間を置いて2回はまったのでメモしとく

手順

  1. /usr/local/bin/mysql.server stop
  • /usr/local/bin/mysql.server start --skip-grant-tables
  • これでパスワード無しでmysqlにログインできるようになる
  • mysql
  • 以後、mysqlでのコマンド
  • use mysql;
  • update user set authentication_string=PASSWORD("") where User='root';
  • flush privileges;
  • exit
  • /usr/local/bin/mysql.server restart
  • おわり
3
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?