數(shù)據(jù)庫(kù)連接錯(cuò)誤
com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Access denied for user ''@'localhost' to database 'imooc'; 每次都連接數(shù)據(jù)庫(kù)出現(xiàn)這個(gè)錯(cuò)誤,求解答
com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Access denied for user ''@'localhost' to database 'imooc'; 每次都連接數(shù)據(jù)庫(kù)出現(xiàn)這個(gè)錯(cuò)誤,求解答
2016-09-01
舉報(bào)
2016-09-01
問題解決了,connection = DriverManager.getConnection(URL,USERNAME,PASSWORD)中,只寫了URL就會(huì)導(dǎo)致這個(gè)錯(cuò)誤