How can I connect to mariadb using java?
<p>I've used:</p>

<pre><code>Connection  connection = DriverManager.getConnection(
    "jdbc:mysql://localhost:3306/test", "username", "password"
);
Statement stmt = connection.createStatement();
stmt.executeUpdate("CREATE TABLE a (id int not null primary key, value varchar(20))");
stmt.close();
connection.close();
</code></pre>

<p>but it gives an error "No route to host"</p>