MySQL + MATLAB -> Invalid connection

조회 수: 8 (최근 30일)
Steven
Steven 2011년 10월 12일
Greetings,
I'm trying to set up MySQL with MATLAB with no success. I downloaded EasyPHP 5.3.8.1 and I created a simple database named 'mydata'. I also enabled the php_pdo_odbc in PHP extensions. For the rest, I let the default settings. Finally, I put my file into the \www folder with the following content:
clear all;
conn = database('mydata','root','');
ping(conn)
and this error resulted :
??? Error using ==> database.ping at 153
Invalid connection.
Error in ==> myfile at 4
ping(conn)
I use MatlabR2010a on Windows 7, 64 bit and database toolbox version 3.7. I've tried different username such as 'root', 'localhost', '127.0.0.1' but no way to fix it. Your help is welcome.
Regards, Steven
  댓글 수: 1
Kaustubha Govind
Kaustubha Govind 2011년 10월 12일
Check conn.Message and see if you are getting any useful error message.

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

채택된 답변

Steven
Steven 2011년 10월 12일
Hi folks,
I finally fixed the prob !
First, I downloaded MySQL ODBC driver 5.1. Then, I add it in Start > Settings > Control Panel > Administrative Tools > Data Sources(ODBC)
and everything works well !
Steven

추가 답변 (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