古詩詞大全網 - 口號大全 - JAVA純驅動連接MYSQL數據庫出現服務器內部錯誤

JAVA純驅動連接MYSQL數據庫出現服務器內部錯誤

這個是連接錯誤

("jdbc:mysql://localhost:8080/company?uer=root&password=root"); //uer應為user

去掉8080,看看妳的mysql端口號是不是3306,如果是就用下面的

("jdbc:mysql://localhost/company?user=root&password=root");

或者

("jdbc:mysql://localhost:3306/company?user=root&password=root");

如果不是就改為其他端口號