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

Mysql 5.7 パスワード変更

Last updated at Posted at 2017-04-24

Mysql 5.7 初期設定

環境:
OS mac OS X 10.12
Mysql 5.7.17

mysqlのrootのパスワードを初期設定で変更するとき下記のような記事をよく見かけるが、

UPDATE user SET password=PASSWORD('your_password')  WHERE host='localhost' AND user='root';
FLUSH PRIVILEGES;

Mysql 5.7*からはカラムの名前が変更になる。

authentication_string

これが変更になりましたので、クエリで変更するときももちろん変更になります。


update mysql.user set authentication_string = 'PSSWORD' where user = 'root';

こんな感じになります。(_)/.oO Hello

2
3
2

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