(linux) i am looking for the driver name
Show older comments
hi folks,
this is the messge which i get when trying to connect to a database. can you tell me which driver name is beeing requested ?
thanks
------>
conn = database('nameofdatabank',XXXX, XXXX,...
'twz1.jdbc.mysql.jdbcMysqlDriver','jdbc:mysql://xxxx.xxx.ch:3306/XXXXX')
conn =
Instance: 'xxxxxx'
UserName: 'XXXX'
Driver: []
URL: []
Constructor: [1x1 com.mathworks.toolbox.database.databaseConnect]
Message: [1x76 char]
Handle: 0
TimeOut: []
AutoCommit: 'off'
Type: 'Database Object'
>> conn.Message
ans =
JDBC Driver Error: twz1.jdbc.mysql.jdbcMysqlDriver. Driver Not Found/Loaded.
Answers (1)
Titus Edelhofer
on 23 May 2011
Hi, typically the driver comes as some jar file (e.g. mysql-connector-java-5.1.5-bin.jar). You will need to make this accessible in MATLAB by adding it to the java class path, either dynamically
javaaddpath /home/hansueli/mysql-connector-blabla.jar
or by adding the full path to the static classpath:
edit classpath.txt
and add the full path to the .jar file. The first one has to be done every time, the second one is permanent (requires restart of MATLAB).
Titus
Categories
Find more on Database Toolbox in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!