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