Cannot log in to mysql DB by ghost user
- Dominant language
- Go
- Stars
- 13.6k
- Forks
- 1.4k
- Avg merge
- 2h 31m
- Merged PRs (30d)
- 4
Description
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:
```shell=
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
```shell=
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=//ghost-file/co_ghost.panic.flag \
--throttle-flag-file=//ghost-file/co_ghost.throttle.flag \
--postpone-cut-over-flag-file=//ghost-file/co_ghost.postpone.flag \
--execute
```
I encounter this error:
```shell=
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! 🙏
Contributor guide
Assessment
This issue has not been assessed yet.