Cannot log in to mysql DB by ghost user

オープン
#1,416 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 10 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
30/100
issue の種類
バグ
明瞭さ
説明が足りない
活発さ
停滞
技術スタック
go, mysql
領域
cli, databases

調査の方向性

まず、提供された gh-ost コマンドを MySQL の master ポート 3307 と slave ポート 3308 に対して再現し、次に localhost の認証エラーを発生させている接続経路を調査します。CLI が指定された設定にもかかわらず 'ghost'@'localhost' として MySQL に接続する理由を特定し、検証済みの設定またはコードの修正を記録できれば完了です。

索引モデルが issue の本文から書いたものです。

説明

I'm using gh-ost on my local environment to test if my migration is work.

My master-slave setting is

127.0.0.1:3307 -> master by docker image
127.0.0.1:3308 -> slave by docker image

I've created an user 'ghost'@'%' on master and logging in by this account is tested by command line below:

mysql -h 127.0.0.1 --port=3307 -ughost -p # for master works!
mysql -h 127.0.0.1 --port=3308 -ughost -p # for slave works!

Now when I execute this command

gh-ost \
--user="ghost" \
--password="ghost" \
--host="127.0.0.1" \
--serve-tcp-port=3307 \
--max-load=Threads_running=100 \
--critical-load=Threads_running=1000 \
--chunk-size=2000 \
--throttle-control-replicas="127.0.0.1:3308" \
--replica-server-id='2' \
--max-lag-millis=1000 \
--nice-ratio=12 \
--allow-on-master \
--database="test-db" \
--table="test_table" \
--verbose \
--alter="ADD action_item_id int(10) unsigned NOT NULL DEFAULT 0" \
--switch-to-rbr \
--allow-master-master \
--cut-over=default \
--exact-rowcount \
--concurrent-rowcount \
--default-retries=120 \
--panic-flag-file=/<path>/ghost-file/co_ghost.panic.flag \
--throttle-flag-file=/<path>/ghost-file/co_ghost.throttle.flag \
--postpone-cut-over-flag-file=/<path>/ghost-file/co_ghost.postpone.flag \
--execute

I encounter this error:

2024-05-10 14:39:55 INFO starting gh-ost 1.1.6
2024-05-10 14:39:55 INFO Migrating `test-db`.`test_table`
2024-05-10 14:39:55 INFO Tearing down inspector
2024-05-10 14:39:55 FATAL Error 1045: Access denied for user 'ghost'@'localhost' (using password: YES)

I don't know how to resolve this issue because currently, I believe my host and port settings are correct. Or are my settings incorrect?

Thank you! 🙏

主要言語
Go
スター
13.6k
フォーク
1.4k
平均マージ
9日 19時間
マージ済み PR(30日)
1

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

github/gh-ost のほかの issue

github/gh-ost の issue をすべて見る

似ている issue

Go の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。