我正在尝试通过处理IDE连接到Azure云中托管的MySQL服务器,但是,它不会让我连接。下面是代码。
import de.bezier.data.sql.*;
import processing.serial.*;
Serial myPort; // Create object from Serial class
String val; // Data received from the serial port
MySQL msql; //Create MySQL Object
void setup()
{
String password = "pass";
String username="";
String url ="jdbc:mysql://oursystem.mysql.database.azure.com:3306/projectdb?verifyServerCertificate=true&useSSL=true&requireSSL=false";
msql = new MySQL(this,url,"projectdb",username,password);
if ( msql.connect() )
{
println("connected");
}
else
{
// connection failed !
}
}
一旦我运行这个我得到错误
SQL.connect(): Could not connect to the database ( jdbc:mysql://jdbc:mysql://oursystem.mysql.database.azure.com:3306/projectdb?verifyServerCertificate=true&useSSL=true&requireSSL=false/projectdb ).
java.sql.SQLException: The connection property 'requireSSL' only accepts values of the form: 'true', 'false', 'yes' or 'no'. The value 'false/projectdb' is not in this set.
如果我要连接到本地主机MYSQL服务器它会连接好,有什么想法吗?