Matlab Mysql remote connection fails

조회 수: 5 (최근 30일)
Mortada
Mortada 2011년 11월 28일
Hi , I am using JDBC connector to connect to my remote mysql database. I have done the following : db_conn = database('db_name','db_user','password', ... 'com.mysql.jdbc.Driver', ... 'jdbc:mysql://MY_REMOTE_IP:3306/db_name') and then this returns the following : db_conn =
Instance: 'db_name'
UserName: 'db_user'
Driver: []
URL: []
Constructor: [1x1 com.mathworks.toolbox.database.databaseConnect]
Message: [1x97 char]
Handle: 0
TimeOut: []
AutoCommit: 'off'
Type: 'Database Object'
and if I check the connection using : isconnection(db_conn) it will return 0 ...
Any idea ?

채택된 답변

Titus Edelhofer
Titus Edelhofer 2011년 11월 28일
Hi,
take a look at
db_conn.Message
what does it say?
Titus
  댓글 수: 2
Mortada
Mortada 2011년 11월 28일
Thank you so much, I mistyped the /db_name and db_conn.Message made me aware of it :-)
This is solved.
Titus Edelhofer
Titus Edelhofer 2011년 11월 28일
your welcome ;-)

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Database Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by