com.mysql not found error

Discussion in 'Java' started by thrishul, Oct 5, 2020.

  1. thrishul

    thrishul

    Joined:
    Oct 5, 2020
    Messages:
    3
    Likes Received:
    0
    I have installed the driver required for connecting MySQL with java. At first it shown class not found exception.later it is showing com.sql package not found.sometimes it is also showing jdbc symbol not found. Can anyone please resolve my problem
     
    thrishul, Oct 5, 2020
    #1
    1. Advertisements

  2. thrishul

    sunfighter

    Joined:
    Nov 27, 2019
    Messages:
    122
    Likes Received:
    17
    Check the address that you are using to connect to the DB. Good chance the DB address is wrong.
     
    sunfighter, Oct 5, 2020
    #2
    1. Advertisements

  3. thrishul

    thrishul

    Joined:
    Oct 5, 2020
    Messages:
    3
    Likes Received:
    0
    Now I am getting class not found exception after a lot of struggle also I have not solved. Help me if u know. No problem with address
     
    thrishul, Oct 5, 2020
    #3
  4. thrishul

    sunfighter

    Joined:
    Nov 27, 2019
    Messages:
    122
    Likes Received:
    17
    sunfighter, Oct 6, 2020
    #4
  5. thrishul

    thrishul

    Joined:
    Oct 5, 2020
    Messages:
    3
    Likes Received:
    0
    Thanks a lot for your response. But I am facing problem with MySQL jar file. After getting jar file, I just wrote one line Class.forName("com.mysql.jdbc.Driver");
    It is getting class not found exception. I have deleted and download jar file for several times and also checked class path also. Help me if you know.
     
    thrishul, Oct 6, 2020
    #5
  6. thrishul

    John Joe

    Joined:
    Apr 25, 2017
    Messages:
    156
    Likes Received:
    20
    Location:
    Malaysia
    What IDE you using? Did you add the jar file to your project ?
     
    John Joe, Oct 9, 2020
    #6
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.