LoginSignup
0
0

More than 3 years have passed since last update.

MEMO:update mysql.user set password=PASSWORD('')が使えない時の解決法

Posted at

概要

mariaDBでrootのパスワードがわからなくなった。
【update mysql.user set password=PASSWORD('')】
を実行したところ実行できなかった。

解決方法

こっちを使えばいいみたい
【alter user 'root'@'localhost' identified BY ''】
BYの後の''の間に新しく設定するパスワードを入力

詳細手順

1.mariaDB停止
 mac:【mysql.server stop】
2.セーフモード起動
 mac【mysql.server start --skip-grant-tables】
3.mariaDB接続
4.【use mysql;】実行
5.【alter user 'root'@'localhost' identified BY ''】
6.mariaDBを再起動する

0
0
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
0
0