![]() ![]() String url1 = "jdbc:mysql://localhost:3306/test1" Ĭonn1 = DriverManager.getConnection(url1, user, password) creates three different Connection objects Java code example connect to MySQL databaseThe following example program makes three connections to three MySQL database in three different ways: import If a connection was made successfully with the database, the getConnection() method returns an instance of Connection class which will be used to make queries and perform other database operations. For example, to send a username and password, write: ?user=root&password=secret
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |