(linux) i am looking for the driver name
Afficher commentaires plus anciens
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.
Réponses (1)
Titus Edelhofer
le 23 Mai 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
Catégories
En savoir plus sur Database Toolbox dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!