package org.mynonglam.connectdb;

import java.sql.Connection;
import java.sql.DriverManager;

public class DbConnection {

	public DbConnection() {
	}

	public Connection getConnection() {
		Connection connection = null;

		try {
			Class.forName("com.mysql.jdbc.Driver");
			connection = DriverManager
					.getConnection("jdbc:mysql://mysql-mynonglam.jelastic.tsukaeru.net/user?setUnicode=true&characterEncoding=UTF-8", "user", "khongco");

		} catch (Exception e) {
			e.printStackTrace();
			System.out.println("error in connect " + e.toString());
		}

		return connection;
	}	

}
