1

I'm coding a simple Android App that connects to my MySQL DB hosted on my laptop, using VertrigoServ. But everytime I run the App on my device it crash, and on the Log of Android Studio it gives me this error:

java.sql.SQLException: Invalid authorization specification message from server: "Access denied for user 'root'@'Samsung-S7-edge-di-Filippo.station' (using password: YES)"

and the code that i wrote is this:

try {
        Class.forName("com.mysql.jdbc.Driver").newInstance();
        Connection DB = DriverManager.getConnection("jdbc:mysql://192.168.1.8:3306/gestionaleazienda?zeroDateTimeBehavior=convertToNull","root","vertrigo");
        if(!DB.isClosed())
        {
            //...
            DB.close();
        }
        else
        {
            //...
        }

    }catch(Exception e)
    {
        e.printStackTrace();

    }
Filippo
  • 163
  • 5
  • 13

0 Answers0