Hi i am trying to connect to MySql trough Processing with :
bezier.de/processing/libs/sql/
(this is my first post and i guess for spam reasons i can't make this a proper link, apologies)
So far i have been very unsuccessful, i keep getting this error:
Quote:SQL.connect(): Could not connect to the database ( jdbc:mysql://localhost/visual_output ).
com.mysql.jdbc.CommunicationsException: Communications link failure due to underlying exception:
** BEGIN NESTED EXCEPTION **
java.net.SocketException
I 'downsized' my code to the 'basics' to get a connection working in an attempt to track the error.
Code:
import de.bezier.data.sql.*;
// created 2005-05-10 by fjenett
// updated fjenett 20080605
MySQL dbconnection;
void setup()
{
size( 100, 100 );
// this example assumes that you are running the
// mysql server locally (on "localhost").
//
// replace --username--, --password-- with your mysql-account.
//
String user = "root";
String pass = "******";
// name of the database to use
//
String database = "visual_output";
// connect to database of server "localhost"
//
dbconnection = new MySQL( this, "localhost", database, user, pass );
if ( dbconnection.connect() )
{
//query etc
}
else
{
// connection failed !
println("fail");
}
}
I am kinda lost atm, anyone ideas?