Trying to Connect different computers database . Throws Access denied for user 'root'@'DEV106' (using password: YES)
<p>I am trying to connect with my different computer mySQL db using following code</p>

<pre><code>public static void main(String[] args) throws ClassNotFoundException, SQLException
{
    Class.forName("com.mysql.jdbc.Driver");
    Connection con = DriverManager.getConnection("jdbc:mysql://IP:3306/test","root","pass");
    Statement st=con.createStatement();
    ResultSet rs=st.executeQuery("select * from demo");
    while(rs.next())
    {
        System.out.println(rs.getString(1));
    }

}
</code></pre>

<p>Note : my all computer are connected eith LAN architecture and also gives all the permission in between those computer, Certainly i don't know what could be issue if someone can help me out.</p>