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 8139697
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T11:55:04+00:00 2026-06-06T11:55:04+00:00

I am trying to make connect clojure to mysql, but somehow fail. My project.clj

  • 0

I am trying to make connect clojure to mysql, but somehow fail.
My project.clj is:

(defproject my-project "0.1.0-SNAPSHOT"
  :description "FIXME: write description"
  :url "http://example.com/FIXME"
  :license {:name "Eclipse Public License"
  :url "http://www.eclipse.org/legal/epl-v10.html"}
  :dependencies [[org.clojure/clojure "1.3.0"]
                 [org.clojure/java.jdbc "0.2.3"]]
  :jvm-opts ["-Djdbc.drivers=com.mysql.jdbc.Driver"])

My file is:

(ns my-project
  (:require [clojure.java.jdbc :as sql]))


(def db {:classname "com.mysql.jdbc.Driver"
         :subprotocol "mysql"
         :subname "//localhost:3306/db"
         :user "xxx"
         :password "xxx"})

And I am trying to run the following from the REPL:

(sql/with-connection db (sql/with-query-results rows "show tables;"))

The error I am getting is:

No suitable driver found for jdbc:mysql://localhost:3306/db

I have in sql a database called db and I ensured mysql.server is running on port 3306.
I would be grateful if someone could give me a hint.
Also my error message is not dependant from the username and password I provide, and nothing is shown on the log file from mysql.

Thanks!

  • 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-06T11:55:06+00:00Added an answer on June 6, 2026 at 11:55 am

    You still fail to put the driver in the classpath. The org.clojure/java.jdbc only provides the client libraries, not the driver itself. Add the following to your :dependencies:

    [mysql/mysql-connector-java "5.1.18"]
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to make a socket.io based server but whenever I connect by
I am trying to make a simple query to a small MYSQL table, but
Clarification: I am trying to make the portlets sortable, but trying to connect them
I am trying to connect with google via oauth V2 I make http request
Trying to make the infamous checkall checkbox for dynamically created rows from a MySQL
i'm trying to make a program that will connect two points that i click
I am trying to make an Android/ Java application that needs to connect to
I'm trying to make a C# app that will connect to a file share,
Iam trying to make a connection between my database on the MYSQL(iam using the
I'm trying to make a C#.net app connect to a server using the XMLSocket

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.