gpt4 book ai didi

mysql - 无法从 Glassfish 池访问 MySQL

转载 作者:行者123 更新时间:2023-11-29 23:29:16 26 4
gpt4 key购买 nike

我有一个按照 tutorial 创建的连接池。还有从 XAMPP 创建的 MySQL,在端口 3036 上运行。连接池属性有:

user       admin
password admin
URL jdbc:mysql://localhost:3036/test2

在MySQL的my.ini中我添加了

[client] 
user=admin
database=test2
password = admin
port = 3036

但是当我尝试 ping 时,我发现了一个错误:

Ping Connection Pool failed for Test2. The connection could not be allocated: Access denied for user 'admin'@'localhost' (using password: YES)

设置有什么问题?

最佳答案

以 root 身份运行 mssql shell 并尝试执行:

GRANT ALL ON test2.* TO 'admin'@'localhost';

也许这会有所帮助。

关于mysql - 无法从 Glassfish 池访问 MySQL,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26688637/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com