2
1

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.

XAMPP/mysqlのroot password忘れたときにしたこと

Posted at

概要

記載の通りです。
よくパスワード忘れるんですよね。。。

環境

ソフト バージョン
OS Windows 10
XAMPP 3.2.2
mysql 15.1

やり方

1. mysqldをセーフモードで起動

mysqld --skip-grant-tables
--skip-grant-tablesオプションにより、設定したプラグイン情報をロードしないで呼び出すことができるとのこと。
ちなみに、mysqldはmysqlのデーモンです。

2.mysqlにログイン

mysql -u root mysql

3.パスワードの更新

mysql> commit; 

4.mysqlの再起動

mysqld restart
あるいは、XAMPPのコントロールパネルより再起動する。

おわり

以上です。パスワードはできるだけ忘れないようにしたいものです。。

参考文献
https://dev.mysql.com/doc/refman/5.6/ja/server-options.html

2
1
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
2
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?