private DBHandler(String ServerIP, String userName, String password)
{
DB_USERNAME = userName;
DB_PASSWORD = password;
DB_CONNECTION_URL = "jdbc:mysql://"+ServerIP+"/Test";
connection = createConnetcion(DB_DRIVER, DB_CONNECTION_URL, DB_USERNAME, DB_PASSWORD);
System.out.println("Connection created");
}
执行此代码时发生 java sql 异常。“不允许主机 'WS1A101.ushustech.com' 连接到此 MySQL 服务器”。对我的代码有任何投诉吗?这里到底出了什么问题?