Java mySQL with 000webhost

后端 未结 4 2079
终归单人心
终归单人心 2021-01-21 05:12

I created a mySQL database on 000webhost and I wanted to connect it into my Java program but somehow driver aren\'t receiving sockets. Here is my code:

Class.for         


        
4条回答
  •  青春惊慌失措
    2021-01-21 05:48

    As the javadoc for the DriverManager#getConnection() method says:

    Attempts to establish a connection to the given database URL.

    Therefore, remove the Users table name from the provided URL and it should work.

提交回复
热议问题