0
0

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 1 year has passed since last update.

DockerでMySQL接続時にHost xxx is not allowed to connect to this MySQL serverが出た時の対処法

Posted at

概要

DockerでMySQL接続時にタイトルのエラーが出たので、原因と対処法を整理しました。

確認した内容

以下を実行してみる

select Host, User, authentication_string from mysql.user;

Hostがlocalhostとなっていました。

対処法

以下を実行し、Hostがワイルドカードなユーザを作成する

CREATE USER 'root' IDENTIFIED BY '';
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' WITH GRANT OPTION;

上記コマンドにより、以下のユーザが作成される

User:root
password : なし
Host:%

参考

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?