2fast4you87
Erfahrenes Mitglied
Ja habe es geprüft, kann mich von extern aus anmelden.
Folge dem Video um zu sehen, wie unsere Website als Web-App auf dem Startbildschirm installiert werden kann.
Anmerkung: Diese Funktion ist in einigen Browsern möglicherweise nicht verfügbar.
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
public class mysql1 {
public static void main(String[] args) {
Connection con = null;
try //treiber laden
{
Class.forName("com.mysql.jdbc.Driver").newInstance();
}
catch (Exception ex)
{
System.out.println("Kann Treiber nicht laden!");
}
try {
con = DriverManager.getConnection("jdbc:mysql://localhost/vsee?user=root&password=123");
}
catch (SQLException ex) {
// Fehler behandeln
System.out.println(ex.getMessage());
System.out.println("SQLException: " + ex.getMessage());
System.out.println("SQLState: " + ex.getSQLState());
System.out.println("VendorError: " + ex.getErrorCode());
}
}
}
Communications link failure due to underlying exception:
** BEGIN NESTED EXCEPTION **
java.net.SocketException
MESSAGE: java.net.SocketException: Unrecognized Windows Sockets error: 10106: cr
eate
STACKTRACE:
java.net.SocketException: java.net.SocketException: Unrecognized Windows Sockets
error: 10106: create
at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.ja
va:156)
at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:276)
at com.mysql.jdbc.Connection.createNewIO(Connection.java:2666)
at com.mysql.jdbc.Connection.<init>(Connection.java:1531)
at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java
:266)
at java.sql.DriverManager.getConnection(DriverManager.java:582)
at java.sql.DriverManager.getConnection(DriverManager.java:207)
at mysql1.main(mysql1.java:21)
** END NESTED EXCEPTION **
Last packet sent to the server was 31 ms ago.
SQLException: Communications link failure due to underlying exception: