connection to MySQL and Matlab 2010
이전 댓글 표시
hi i am trying to connect my MySQL database with matlab 2010th but I get the following error
[Microsoft] [ODBC Driver Manager] "Please verify login information and database That Are valid url."
the code I'm using is
conn=database('prueba','root','root');
if (~isconnection(conn))
str=conn.Message
h=errordlg(str,'Error','modal' );
while ishandle(h)
pause(.25)
end
error(str)
end
set(handles.Res_Des_Cas,'String',query);
prueba is my database root is my user y password
I already I have installed the MySQL ODBC 5.1 and when I use the QueryBuilder can import and export data from the database, but when I use a file .m can not
채택된 답변
추가 답변 (2개)
Oleg Komarov
2011년 4월 20일
You have to set up you DSN first manually:
system('%SystemRoot%\system32\odbcad32.exe');
댓글 수: 2
Luis Osorio
2011년 4월 21일
Walter Roberson
2011년 4월 21일
Probably
conn = database ('jdbc:mysql://localhost:3306/pueba','root','root');
카테고리
도움말 센터 및 File Exchange에서 Database Toolbox에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!