MySQL拒绝idea登录,无法从Intellij连接到在docker容器中运行的mySql-“指定的数据库用户/密码组合被拒绝”。...

在Ubuntu上,本地通过Docker运行的MySQL拒绝了IntelliJ(IDEA)的连接尝试,报错'指定的数据库用户/密码组合被拒绝'。检查发现用户dev已在localhost上有权限,但连接仍然失败。解决方案包括通过docker inspect获取容器IP,并修改MySQL用户允许所有位置访问(将'dev'@'localhost'改为'dev'@'%'>),从而成功连接。
摘要由CSDN通过智能技术生成

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`

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值