Unit 4: Database Connectivity

JDBC (Java Database Connectivity)

Programs

Running the JDBC program

  1. Install MySQL on your machine

  2. Create a database of your choice

  3. Run the program

Using Docker to run MySQL

If you want to run the JDBC program, but do not want to install MySQL on your machine, you can use Docker to run a MySQL container.

Use the following commands in order to run a MySQL container: (Make sure you have Docker installed on your machine)

  1. Pull the MySQL image from Docker Hub

  2. Run the MySQL container

  3. Access the MySQL container

  4. Create a database

  5. Run the JDBC program

Last updated

Was this helpful?