Can you help me to correct this errror?

Hi
Why sometimes I managed to connect MATLAB and MySQL and sometimes I get this error?? Can you help me please
No connections open
Connecting to host = localhost user = root password =
??? Error using ==> mym
Unknown MySQL server host 'localhost' (10022)
Error in ==> diagnostics>diagnostics_OutputFcn at 79
mym('open', 'localhost', 'root', '')
Error in ==> gui_mainfcn at 265
feval(gui_State.gui_OutputFcn, gui_hFigure, [], gui_Handles);
Error in ==> diagnostics at 42
gui_mainfcn(gui_State, varargin{:});
thanks

댓글 수: 6

Tomas
Tomas 2012년 11월 7일
No solution?? :(
David Barry
David Barry 2012년 11월 7일
Difficult to say without seeing the lines of code that are throwing the error. Can you include these. Is your password blank?
David Barry
David Barry 2012년 11월 7일
Are you using fetch command?
Tomas
Tomas 2012년 11월 7일
편집: Tomas 2012년 11월 7일
The error is at this line
mym('open', 'localhost', 'root', '')
Yes the password is bank knowing that sometimes it works and sometimes i get this error :(
No, I didn't use a fetch command
David Barry
David Barry 2012년 11월 7일
As mym isn't a MATLAB command I assume you have downloaded something off the File Exchange. I suggest you try using the built in MATLAB function database.fetch which has a very good help document
David Barry
David Barry 2012년 11월 7일
Assuming of course you have the database toolbox

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

답변 (1개)

Tomas
Tomas 2012년 11월 7일

0 개 추천

댓글 수: 3

Tomas
Tomas 2012년 11월 8일
help me please :(
David Barry
David Barry 2012년 11월 9일
Have you tried using the built in database functions like I suggested?
I tried to do this
conn = database('localhost','root','')
a = isconnection(conn)
but i get this result
conn =
Instance: 'localhost'
UserName: 'root'
Driver: []
URL: []
Constructor: [1x1 com.mathworks.toolbox.database.databaseConnect]
Message: [1x166 char]
Handle: 0
TimeOut: []
AutoCommit: 'off'
Type: 'Database Object'
a =
0

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

카테고리

태그

질문:

2012년 11월 7일

Community Treasure Hunt

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

Start Hunting!

Translated by