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).