Firstly, I need to login to the server using a SSH client
password to login to the server: abc123
database name: db123
To start a mysql client, I need to type the cmd:
./mysql/bin/mysql --defaults-file=$HOME/mysql/my.cnf -u aSQLUsername -p123456
Then I can create new databases/ tables/ execute query...etc
But now I want to write a Java program to access the database.
I've download 'mysql-connector-java-5.1.10.tar.gz' and extracted the files
and I've set the CLASSPATH
And I don't know what parameters should I put in getConnection() in my Java Program,
conn = DriverManager.getConnection("jdbc:mysql://myAccountName@abc.no-ip.org:4321/db123", "aSQLUsername", "123456");
BUT the Java program output something like --
SQLException: No suitable driver found for jdbc:mysql://myAccountName@abc.no-ip.org:4321/db123
Do I need to enter the password of the server(abc123)? OR
Do I need to specific the location of the file 'my.cnf'?
Thanks for help.