Note that there are some explanatory texts on larger screens.

plurals
  1. PONo suitable driver found for dbc:mysql://localhost:8080/kholofedb
    primarykey
    data
    text
    <p>I have searched across the internet about this problem the whole of yesterdy... I am a beginner with JDBC, but the solutions provided here and other sites are not working for me.</p> <p>I am using "<code>mysql-connector-java-5.1.18-bin.jar</code>" on Linux Mint 32 bit.. I am using Eclipse 3.8 ...I have installed mySQL-server and it is running ( I ran it using: <code>sudo service mysql start</code> )... at runtime I get this error</p> <pre><code>connecting to psysical database... java.sql.SQLException: No suitable driver found for dbc:mysql://localhost:8080/kholofedb at java.sql.DriverManager.getConnection(DriverManager.java:604) at java.sql.DriverManager.getConnection(DriverManager.java:221) at com.psybergate.database.SimbleCode.main(SimbleCode.java:21) </code></pre> <p>here is my source code:</p> <pre><code>package com.psybergate.database; import java.sql.Connection; import java.sql.DriverManager; import java.sql.SQLException; import java.sql.Statement; import java.util.Scanner; public class SimbleCode { private static final String USER = "root" , PASS = ""; public static void main(String ...args) { try { String connectionURL = "dbc:mysql://localhost:8080/kholofedb"; Class.forName("com.mysql.jdbc.Driver"); // Class.forName("org.postgresql.Driver"); System.out.println("connecting to psysical database..."); Connection conn = DriverManager.getConnection(connectionURL , USER , PASS); Statement statement = conn.createStatement(); System.out.println("Connection has been made"); Scanner keyBoardScanner = new Scanner(System.in); System.out.println("Enter table name:"); String tableName = keyBoardScanner.nextLine(); System.out.println("Creating table..."); statement.executeQuery("create table " + tableName + " (name , age ,salary)"); System.out.println("Table successfully created"); System.out.println("Inserting data into the table ..."); statement.executeUpdate("insert into " + tableName + "values (kholofelo , 21 , 9969696)"); } catch (ClassNotFoundException | SQLException e) { e.printStackTrace(); } } } </code></pre> <p>Thanks in advance :)</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload