PATH=$PATH:/usr/java/bin; export PATH
to your .profile file in your top level directory
These are the steps to connect to mysql on jaguar.ecst.csuchico.edu (same as ect-unix.ecst.csuchico.edu).
CLASSPATH=./:/usr/java/lib/mysql-connector-java-5.1.5-bin.jar; export CLASSPATH
(or download the .jar here and put in the same directory as your code - hmmm, this file has an extension .jar but when Windows downloads it it changes it to .zip Make sure that your classpath and actual file name are the same)
jdbc:mysql://db.ecst.csuchico.edu:5551/databasename
db.ecst.csuchico.edu is the actual server where mysql is at and 5551 is the port number.
Also you should change databasename
to the database/username that Elbert gives you to use. Usually it is your unix username. For example, I use
The line for your code to get the appropriate driver: Class.forName("com.mysql.jdbc.Driver");
I think that that's all that one needs to connect to mysql through jaguar.
You can always ssh to jaguar and test your code directly and easily if you do not have a GUI.
You could also test your java code with GUIs and connectivity directly off of jaguar:
For displaying your GUIs on your local machine when running from a remote machine, see here
To connect to your local MySql in Eclipse set up on your home machine
If you have downloaded MySql to your home machine, to test your code and db connections you can use the URL
As noted in class, you might need to get your machine's IP address (how?) and use it rather than localhost for the URL...and you might want to set up a new database with a name you know so you do not need to know the default name. Both of these can be done through the MySQL admin tool.
I also have an email from a student working from home - trying to connect to jaguar who had problems. I will include the
text here in case it might help you.
However it might be a good idea to just ssh into jaquar and run the database from there since firewalls seem to be a problem connecting from elsewhere to the database.
Elbert told me basically the same thing that you did, ie the JDBC connection string you quoted. However I just tried to directly connect from my computer (both in and out of VPN) to the DB with no success. I'm getting errors like this which probably means the port is blocked by the firewall: java.net.ConnectException MESSAGE: Connection timed out: connect I just did some more research into getting around this and found http://forge.mysql.com/wiki/MySQL_Proxy All I need to do is ssh onto jaguar, and run ./mysql-proxy \ --proxy-backend-addresses=db.ecst.csuchico.edu:5551 \ --proxy-address=jaguar.ecst.csuchico.edu:12340 & Then I can connect from my VPN-ed home computer with a connection like: jdbc:mysql://jaguar.ecst.csuchico.edu:12340/username(Reminder to me: links to this page at 1, 2, and 3 so I remember to remove them when Oracle is back up)