Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.sql.Connection;
- import java.sql.DriverManager;
- import java.sql.SQLException;
- public class App {
- public static void main(String[] args) throws SQLException, ClassNotFoundException {
- // Load the JDBC driver
- Class.forName("org.mariadb.jdbc.Driver");
- System.out.println("Driver loaded");
- // Try to connect
- Connection connection = DriverManager.getConnection
- // ("jdbc:mariadb://localhost:3306/test", "test", "test");
- ("jdbc:mariadb://82.177.146.148:3306/test", "test", "test");
- System.out.println("It works!");
- connection.close();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement