get mariadb Connection - Java java.sql

Java examples for java.sql:Connection

Description

get mariadb Connection

Demo Code


//package com.java2s;
import java.sql.Connection;
import java.sql.DriverManager;

import java.sql.SQLException;

public class Main {
    final private static String url = "jdbc:mariadb://aaa.yourserver.org:33066/prevo";
    final private static String ID = "prevo";
    final private static String PASSWD = "prevo09";

    public static Connection getConnection() throws SQLException {
        return DriverManager.getConnection(url, ID, PASSWD);
    }//from www .  j ava  2  s .c  om
}

Related Tutorials