6
5

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.

MySQLの初期パスワードが期限切れの場合のパスワード変更方法

Posted at

初期パスワードがわからない場合は、ログからインストール時に設定されているパスワードを調べる
# grep password /var/log/mysqld.log

次のコマンドでmysqlに接続。
mysql -p --connect-expired-password
パスワード入力を求められるので、初期パスワードを入力する。--connect-expired-passwordつけるのがポイント。

次のコマンドでパスワードを変更(xxxxxxxxxxxが設定するパスワード)
mysql> alter user 'root'@'localhost' identified by 'xxxxxxxxxxx';

6
5
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
6
5

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?