问题描述
我有一个旧数据库,需要从命令提示符处像这样连接
mysql --uUserName -hHostName -pPassword -P3307 -A Schema --skip-secure-auth
如何在JDBC属性--skip-secure-auth
jdbc.driver=com.mysql.jdbc.Driver
jdbc.url=jdbc:mysql://HostName:3307/Schema
jdbc.user=UserName
jdbc.password=Password
jdbc.maxConnections=5
--skip-secure-auth
允许使用4.1之前的旧密码哈希方法.这种过时的身份验证机制由称为 mysql_old_password
.
根据Connector/J手动,默认情况下不禁用(有关disabledAuthenticationPlugins
选项的信息),因此我想默认行为是允许此类连接(即等同于mysql --skip-secure-auth
). /p>
I have one legacy database which needs to be connected like this from command prompt
mysql --uUserName -hHostName -pPassword -P3307 -A Schema --skip-secure-auth
How do I specify the same in JDBC properties --skip-secure-auth
jdbc.driver=com.mysql.jdbc.Driver
jdbc.url=jdbc:mysql://HostName:3307/Schema
jdbc.user=UserName
jdbc.password=Password
jdbc.maxConnections=5
--skip-secure-auth
allows the use of the old, pre-4.1 password hashing method. This obsolete authentication mechanism is handled by a plugin known as mysql_old_password
.
According to the Connector/J manual, it is not disabled by default (read about the disabledAuthenticationPlugins
option), so I suppose the default behaviour is to allow such connections (i.e. equivalent to mysql --skip-secure-auth
).
这篇关于什么JDBC属性对应于mysql命令行的"--skip-secure-auth"?选项?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!