I have a Raspberry Pi running a mysql server which is working fine and I can connect to it with it's ip address (192.168.1.90) (local, for now), and see the databases and tables etc which are stored on it. I have it set up with phpmyadmin where I have created a database called "world" which has a number of tables.
I've tried to connect to it with java with the following code:
Connection connection = DriverManager.getConnection("jdbc:mysql://192.168.1.90/world", "root", "mypass");
However this gives me an error message:
java.sql.SQLException: No suitable driver
I know that the username and password are both correct since I can use them and successfully when I execute the command:
mysql -u root -p
I use my android phone for developing but since it's connected to the wifi that shouldn't be a problem (I can reach 192.168.1.90 fine).
I've been out of the game for a couple of weeks and it feels like there is something I'm missing, but I don't see it.
EDIT: I did not compile the .jar for the mysql connector in the gradle file. However, I now get another error which says:
com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Could not create connection to database server.
Thanks for taking the time to read about my problem. All help is appreciated!