How to make direct connection on the table?

Asked

Viewed 21 times

0

I want to know how you do it Connection in Java to perform the direct connection in the table, or if it is possible to do this.

Example:

conexao = DriverManager.getConnection("jdbc:mysql://localhost:3306/scrum/usuario","root","tonhaoroot");

Database: Scrum table: usuario

The way to declare the connection is correct?

1 answer

1


No, it’s not.

You do not connect directly to the table but to the database, in case scrum. Remove the part /usuario of your connection string.

Once this is done, "IF" your user has access to the table, you can move it through the object Connection (make queries, insertions, etc).

Browser other questions tagged

You are not signed in. Login or sign up in order to post.