Currently unable to connect from Intellij to mySql running locally on docker container on ubuntu.
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| performance_schema |
| sys |
| tasklogs |
+--------------------+
+----------+-----------+------+
| DATABASE | HOST | USER |
+----------+-----------+------+
| tasklogs | localhost | dev |
| tasklogs | localhost | root |
+----------+-----------+------+
+-----------------------------------------------------------+
| Grants for dev@localhost |
+-----------------------------------------------------------+
| GRANT USAGE ON *.* TO `dev`@`localhost` |
| GRANT ALL PRIVILEGES ON `tasklogs`.* TO `dev`@`localhost` |
+-----------------------------------------------------------+
docker ps -a:
When I connect via intellij:
i.e. "The specified database user/password combination is rejected: [28000][1045] Access denied for user 'dev'@'localhost' (using password: YES)"
I am putting in the right password.
Any help really appreciated.
Thanks,
Solution
You didn't map your port with the localhost so you can't use localhost this is why couldn't do it
ports:
- "3306:3306"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With