-4

How can I connect to mysql server database with java? I can't find tutorial about this. I think, it's possible but I am not sure and I don't know how to do it.

3
  • 1
    MySQL is not a 'PHP database'. You connect to it with JDBC and the MySQL Connector-J JDBC driver. This information is readily available.
    – user207421
    Apr 14, 2016 at 3:58
  • What attempts did you make to find tutorials or other resources? There are plenty of them, queryable through probably almost any search engine, not to mention the stack overflow questions which already exist about this and surely would have come up as possible duplicates while you were writing the post
    – Roman
    Apr 14, 2016 at 4:10
  • Did you really search on google???...a lots of tutorials are there....and what did you try? Apr 14, 2016 at 4:12

1 Answer 1

0

To connect to a MySQL database from Java, you can use MySQL Connector/J

available here: https://dev.mysql.com/downloads/connector/j

It's a JDBC driver. Just include the jar file in your CLASSPATH.

The online documentation provides examples of how to use it.

Not the answer you're looking for? Browse other questions tagged or ask your own question.