About 108,000 results
Open links in new tab
  1. Connect Java to a MySQL database - Stack Overflow

    DataSource. DriverManager is a fairly old way of doing things. The better way is to get a DataSource object. Either by using JNDI to look one up that your app server container already configured for you:

  2. java - How to connect NetBeans to MySQL database ... - Stack …

    Jul 20, 2015 · Select MySQL(Connector/J Driver) from the drop down list. The driver file should be listed in the window. If not, you can download the file, then click add and select it from your hard drive. Finally enter your database details such as servername, username and …

  3. java database connectivity error with mysql - Stack Overflow

    Mar 23, 2013 · 1) You don't have mysql-connector.jar in your Classpath. as stated earlier this jar file contains "com.mysql.jdbc.Driver" class it must be present in classpath in order to successful connection to mysql database. you can downlad mysql-connector.jar from mysql.com.

  4. MySQL Connection Error in Java - com.mysql.jdbc.Driver

    Feb 24, 2014 · Add the mysql-connector-java-5.1.29-bin.jar in the WEB-INF/lib folder. Its not enough to just add the jar in your built path. Its not enough to just add the jar in your built path. Even I had the same issue at the start.

  5. How to use XAMPP MySQL database with my Java Application?

    The MySQL database and Apache server are started from the XAMPP Control Panel. Everything went fine. Now I am developing my own Java Desktop Application using JavaFX/Scene Builder/FXML and I want to use a database to store and load various information processed by the Java Application through JDBC.

  6. java - how to install JDBC and how to use it to connect to mysql ...

    Jul 7, 2010 · When I run it on my machine, adding the MySQL JDBC JAR to my CLASSPATH, I get the following result: C:\java -classpath .\mysql-connector-java-5.1.6-bin.jar; persistence.utils.DatabaseUtils product: MySQL version: 5.1.24-rc-community major : 5 minor : 1 Here is the source code:

  7. mysql - database connectivity - java.net.UnknownHostException

    Sep 17, 2013 · MySQL Connection - java.sql.SQLException: Unable to connect to any hosts due to exception 0 Java Web Application can't connect database on remote Tomcat 8 Server

  8. java - Create a class to connect to any database using jdbc - Stack ...

    Dec 2, 2018 · This way I can switch databases and all I need to do (if I have a large code base with many many forms) is change the JDBC connection string to connect to oracle instead of MySQL. So far I have the code to connect to a database but I am trying to figure out how I can make this a class.

  9. mysql - Java database connectivity - Stack Overflow

    Sep 12, 2017 · I checked on internet..it said " you must configure the MySQL Server properties. Right-click the Databases node in the Services window and choose Register MySQL Server to open the MySQL Server Properties dialog box. ".....but in my netbeans the register mysql server option is unclickable....although I installed mysql completely and correctly

  10. how to insert into mysql database with java - Stack Overflow

    Dec 2, 2019 · To insert into mysql, follow these steps-Create a Java Connection to our example MySQL database. I believe you already took care of it.

Refresh