简体   繁体   English

Mysql 5.5访问被拒绝<-Jboss 7

[英]Mysql 5.5 Access denied <— Jboss 7

After reinstalling Mysql 5.5 on my PC mysql refuses all connections made from my Jboss 7 application server. 在PC上重新安装Mysql 5.5之后,mysql拒绝从我的Jboss 7应用程序服务器建立的所有连接。

The configuration files have not changed only the database server instance. 配置文件并没有仅更改数据库服务器实例。 I can connect using the command line (same user and password as defined in the jboss config, that worked on the previous mysql instance) 我可以使用命令行进行连接(与在先前的mysql实例上运行的jboss配置中定义的用户和密码相同)

I set the user and DB as follows: 我将用户和数据库设置如下:

    create database business_service;
    create user 'business_service'@'%' identified by 'xxxx';
    create user 'business_service'@'localhost' identified by 'xxxx';
    GRANT ALL PRIVILEGES ON business_service.* TO 'business_service'@'%' WITH GRANT OPTION;
    GRANT ALL PRIVILEGES ON business_service.* TO 'business_service'@'localhost' WITH GRANT OPTION;

At this point I am able to login to the above DB using mysql workbench and straight from the cmd line: 现在,我可以使用mysql workbench登录到上述数据库,并直接从cmd行登录:

    mysql -u business_service -p

However when I start up Jboss 7 using the same files the connected to the previous mysql 5.5 database (New PC, but as JBoss is file system based and all the paths are the same all I needed to do was copy the file system over) it returns: 但是,当我使用相同的文件启动Jboss 7时,它连接到以前的mysql 5.5数据库(新PC,但是由于JBoss是基于文件系统的,并且所有路径都是相同的,所以我要做的就是复制文件系统)返回:

    Caused by: java.sql.SQLException: Access denied for user 'business_service'@'localhost' (using password: YES)

My assumption is there is some sort of setting saying plain text passwords are not accepted, I first tried with mysql 5.6 but had the same issue, and after messing around with all sorts of mysql settings decided to just revert back to 5.5, but no joy. 我的假设是存在某种设置,说不接受纯文本密码,我首先尝试使用mysql 5.6,但是遇到了同样的问题,并且在弄乱了各种mysql设置后决定只恢复为5.5,但没有任何乐趣。

So my question is: 1) does anything jump out with regard to a switch I have not set to allow an XA JDBC resource to connect? 所以我的问题是:1)关于尚未设置为允许XA JDBC资源连接的开关,有什么问题吗? 2) if not can I tell MYSQL to log the password that is coming in (I can see in the logs that JBOSS tries to connect) so I can see maybe it is encrypted. 2)如果不能,我可以告诉MYSQL记录即将输入的密码(我可以在JBOSS尝试连接的日志中看到),因此我可以看到它是加密的。 3) The Mysql to allow connections without passwords (if all else fails) 4) Any other Ideas? 3)Mysql允许没有密码的连接(如果所有其他操作均失败)4)还有其他想法吗?

Thanks Marc 谢谢马克

Be VERY careful with the characters you use in your user password for MYSQL..... I had an exclamation mark "!" 非常小心您在MYSQL用户密码中使用的字符。..我有一个感叹号“!” as one of the characters and MYSQL does not stop you from using it, however when you login using the same password that you created the account with, it sees the password as incorrect. 作为字符之一,MYSQL不会阻止您使用它,但是,当您使用创建帐户时使用的相同密码登录时,它会认为该密码不正确。

Crazy waste of time, hope nobody else falls into this trap. 疯狂地浪费时间,希望没有其他人陷入这个陷阱。

Cheers Marc 干杯马克

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM