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.
Asked
Active
Viewed 151 times
-4
-
1MySQL 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 '16 at 03: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 '16 at 04:10
-
Did you really search on google???...a lots of tutorials are there....and what did you try? – Piyush Gupta Apr 14 '16 at 04:12
1 Answers
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.

spencer7593
- 106,611
- 15
- 112
- 140