Results 1 to 4 of 4
  1. #1
    chrscote is offline Member
    Join Date
    Oct 2013
    Posts
    3
    Rep Power
    0

    Default Trying to connect to MySQL database

    I am very new to Java and am just trying to figure out how to connect to a MySQL database that I have on my computer from a previous PHP class. The actual PHP server is on my localhost:8888. I have been searching the web for a decent tutorial, but I can't seem to find one that really explains how to connect to a MySQL database. Does anyone know of a good tutorial or can help me figure out at least the basics of how to connect to the database? Once I'm connected, I know all the SQL commands I'd need.

    Chris Cote

  2. #2
    sehudson's Avatar
    sehudson is offline Senior Member
    Join Date
    Mar 2010
    Posts
    356
    Rep Power
    5

    Default Re: Trying to connect to MySQL database

    When you say connect to MySQL database, do you mean from a JAVA application? If so, take a look at Java Database Connectivity (JDBC). You will need to download the JDBC driver for MySQL.

  3. #3
    chrscote is offline Member
    Join Date
    Oct 2013
    Posts
    3
    Rep Power
    0

    Default Re: Trying to connect to MySQL database

    Quote Originally Posted by sehudson View Post
    When you say connect to MySQL database, do you mean from a JAVA application? If so, take a look at Java Database Connectivity (JDBC). You will need to download the JDBC driver for MySQL.
    Yes, this is what I am trying to do. I am trying to connect to the MySQL DB from a Java application. I have downloaded the JDBC driver, but I'm not sure how to use it.

  4. #4
    Tolls is online now Moderator
    Join Date
    Apr 2009
    Posts
    12,016
    Rep Power
    20

    Default Re: Trying to connect to MySQL database

    Please do not ask for code as refusal often offends.

    ** This space for rent **

Similar Threads

  1. connect mysql database to server
    By Sudha G in forum JDBC
    Replies: 2
    Last Post: 11-06-2012, 12:26 PM
  2. Failed to connect to MySQL database
    By eminempark in forum JDBC
    Replies: 3
    Last Post: 10-05-2012, 01:51 PM
  3. How to connect database mysql via Lan
    By ahmed30 in forum JDBC
    Replies: 3
    Last Post: 01-17-2011, 06:36 AM
  4. Replies: 7
    Last Post: 05-09-2010, 12:25 AM
  5. Replies: 15
    Last Post: 04-15-2009, 01:51 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •