(linux) i am looking for the driver name
Mostrar comentarios más antiguos
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.
Respuestas (1)
Titus Edelhofer
el 23 de Mayo de 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
Categorías
Más información sobre Database Toolbox en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!