How to fix [BXSQ0001] An SQL exception occurred: 'No suitable driver found for jdbc:mysql://...?

StackOverflow https://stackoverflow.com/questions/19895457

  •  30-07-2022
  •  | 
  •  

سؤال

I'm evaluating use of Base-X's SQL module with MySQL.

For a simple experiment I started with something similar to the example from http://docs.basex.org/wiki/SQL_Module:

let $conn := sql:connect("jdbc:postgresql://localhost:5432/coffeehouse")
return sql:execute($conn, "SELECT * FROM coffees WHERE price < 10")

(I changed the URL to my mysql database's URL). First attempt results in the error

[BXSQ0001] An SQL exception occurred: 'No suitable driver found for jdbc:mysql://localhost/dbname

I tried the obvious fix - dropped a copy of mysql-connector-java-5.1.26-bin.jar into C:\Program Files (x86)\BaseX\lib and restarted. But the error remains.

Any ideas?

هل كانت مفيدة؟

المحلول

BaseX ships with a couple of different start-up options - there is basex.exe in C:\Program Files (x86)\BaseX and basex.bat in C:\Program Files (x86)\BaseX\bin. The latter one seems to work as expected, the executable doesn't.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top