Ormlite connect to mysql database
<p>I'm trying to connect to mysql database using JdbcConnectionSource in an android application that should use ormlite. I have this method that should connect to the database and create a user table if it doesn't exist:</p>

<pre><code>public UserDao() throws SQLException {

    connectionSource = new JdbcConnectionSource("jdbc:mysql://localhost:3306/sell_buy", "root", "");
    utilisateurDao = DaoManager.createDao(connectionSource, User.class);
    TableUtils.createTableIfNotExists(connectionSource,
            Utilisateur.class);
}
</code></pre>

<p>the problem is that i get a com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure whenever the methood is executed !. I'm pretty sure that the database is running and the information(username and password to connect to the database ) are ok !</p>

<p>I hope someone will help me and thx in advance.</p>