So recently I've decided to get back into RSPS's. Unfortunately I'm still learning. Going my own pace and learning simple guides eventually to lead into big guides.
I'm trying to connect to MySQL in my server and it's throwing this:
Code:
Unable to create connection to database mysql!
com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Client does not support authentication protocol requested by server; consider upgrading MySQL client
Picture here:
Here's my code for the Database line:
Code:
public MySQLController() {
/* DATABASES */
DATABASES = new MySQLDatabase[] {
new MySQLDatabase("localhost", 3306, "mysql", "mysql", "server"), };
And this:
Code:
public void createConnection() {
try {
setConnection(DriverManager.getConnection("jdbc:mysql://" + host + ":" + port + "/" + database, username,
password));
connectionAttempts = 0;
} catch (Exception e) {
System.out.println("Unable to create connection to database " + database + "!");
connectionAttempts++;
e.printStackTrace();
}
}
I've been trying for hours now to understand this. Googled the error and can't find any suggestions.