Connecting to MySQL: FAILURE
in
Integration and Hardware
•
2 years ago
Using example libraries from:
http://bezier.de/processing/libs/sql/
- import de.bezier.data.sql.*;i
- // created 2005-05-10 by fjenett
- // updated fjenett 20081129
- MySQL msql;
- void setup()
- {
- size( 200, 125 );
- // this example assumes that you are running the
- // mysql server locally (on "localhost").
- //
- // replace --username--, --password-- with your mysql-account.
- //
- String user = "kevinexp";
- String pass = "password";
- // name of the database to use
- //
- String database = "dataexp";
- // add additional parameters like this:
- // bildwelt?useUnicode=true&characterEncoding=UTF-8
- // connect to database of server "data.thiswasexpensive.com"
- //
- msql = new MySQL( this, "data.thiswasexpensive.com", database, user, pass );
- if ( msql.connect() )
- {
- msql.query( "SELECT COUNT(*) FROM image" );
- msql.next();
- println( "number of rows: " + msql.getInt(1) );
- }
- else
- {
- // connection failed !
- }
- }
- void draw()
- {
- // i know this is not really a visual sketch ...
- }
That was the code I edited it to match a database I set up on my dreamhost account. However I keep getting this error:
any ideas? I don't get why its trying to connect to the host of : 71-92-65-253.static.mtpk.ca.charter.comSQL.connect(): Could not connect to the database ( jdbc:mysql://data.thiswasexpensive.com/dataexp ).
java.sql.SQLException: Access denied for user 'kevinexp'@'71-92-65-253.static.mtpk.ca.charter.com' (using password: YES)
any help would be most appreciated. Thanks!
1