Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8114783
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T03:15:24+00:00 2026-06-06T03:15:24+00:00

I am trying to connect to a MySQL 5.5 database as follows: public void

  • 0

I am trying to connect to a MySQL 5.5 database as follows:

public void getCon() throws SQLException, ClassNotFoundException {
    Class.forName("com.mysql.jdbc.Driver");
    Connection con=DriverManager.getConnection("localhost/buddhiedgeserver_db","root","amma");
    System.out.println("Connection"+con);
}

However, it is throwing an exception

java.sql.SQLException: No suitable driver found for localhost/buddhiedgeserver_db.

How is this caused and how can I solve it? I am using MyEclipse version 9.1 and I have included the mysql.jar in the classpath.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T03:15:27+00:00Added an answer on June 6, 2026 at 3:15 am
    java.sql.SQLException: No suitable driver found
    

    This means that the JDBC URL is not accepted by any of the loaded drivers as per the Driver#acceptsURL() contract.

    You’ve correctly loaded the MySQL JDBC driver and it has not thrown a ClassNotFoundException, so that part is fine. However, your JDBC URL is completely wrong. It does not conform any syntax as specified in MySQL JDBC driver documentation. Here’s a cite of relevance:

    JDBC URL Format

    The JDBC URL format for MySQL Connector/J is as follows, with items in square brackets ([, ]) being optional:

    jdbc:mysql://[host][,failoverhost...][:port]/[database] »
    [?propertyName1][=propertyValue1][&propertyName2][=propertyValue2]...
    

    If the host name is not specified, it defaults to 127.0.0.1. If the port is not specified, it defaults to 3306, the default port number for MySQL servers.

    jdbc:mysql://[host:port],[host:port].../[database] »
    [?propertyName1][=propertyValue1][&propertyName2][=propertyValue2]...
    

    Here is a sample connection URL:

    jdbc:mysql://localhost:3306/sakila?profileSQL=true
    

    Your JDBC URL of localhost/buddhiedgeserver_db does absolutely not match the documented MySQL JDBC URL format. Fix it accordingly.

    jdbc:mysql://localhost/buddhiedgeserver_db
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to connect to a remote mysql database from an iPhone. I
I'm trying to connect to a MySQL 5 database using the MySQL ODBC 5.1
I'm trying to write a java program to connect to the same MySQL database
I'm trying to connect to MySQL using JDBC connection in a Servlet .I'm using
I am trying to connect to a mysql database within a php script. So
I am trying to connect to a MySQL database using the mysql_connect() command however
I am trying to connect to MYSQL database using the Pear DB library. IS
I am trying to connect to mysql database from jsp page. The connection code
I'm trying to connect to a MySQL database using my ASP.NET Web Forms Application.
I'm trying to connect MySQL database and getting out datas I need it to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.