(linux) i am looking for the driver name
显示 更早的评论
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.
回答(1 个)
Titus Edelhofer
2011-5-23
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
类别
在 帮助中心 和 File Exchange 中查找有关 Database Toolbox 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!