How to make a direct connection to the table?

0

I want to know how to mount the Connection in Java to make the direct connection to 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: user

How to declare the connection correct?

    
asked by anonymous 02.10.2015 / 01:21

1 answer

1

No, it is not.

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

If this is done, "IF" your user has permission to access the table, you can manipulate it by means of the object Connection (make queries, inserts, etc.).

    
02.10.2015 / 01:26