use Text to Matrix Genrater with MYSQL

1 view (last 30 days)
Rohit Pachlor
Rohit Pachlor on 19 Apr 2013
Answered: Walter Roberson on 1 Mar 2018
when I connect MATLAB & MYSQL ,the Error is
>> init_tmg
==================================================================================================
==================================================================================================
You are about to installed the TMG Toolbox to you system. Press any
key to continue!
==================================================================================================
==================================================================================================
Is MATLAB Database Toolbox installed (yes/no)?: yes
Is MySQL installed (yes/no)?: yes
Please give the full path to the MySQL Java Connector (jar file):
C:\Program Files (x86)\MySQL\Connector J
5.1.23\mysql-connector-java-5.1.23-bin.jar
??? Error using ==> fprintf
Invalid file identifier. Use fopen to generate a valid file identifier.
Error in ==> init_tmg at 36
fid=fopen(strcat(matlabroot, filesep, 'toolbox', filesep,
'local', filesep, 'classpath.txt'), 'a'); fprintf(fid, '\n%s', str);
fclose(fid);
How can I Deal with this Error????

Answers (2)

dev
dev on 13 Jun 2014
i solved this problem by coping the mysql-connector-java-5.1.23-bin.jar file to the c:/programfile/matlab/R2012aStudent/toolbox/local , and in the Please give the full path to the MySQL Java Connector (jar file) : mysql-connector-java-5.1.23-bin.jar
no need to give the fullpath in my case because bydefault it checks the file in the "c:/programfile/matlab/R2012aStudent/toolbox/local " folder
  1 Comment
Ilektra Zarafeta
Ilektra Zarafeta on 28 Feb 2018
I did what you wrote above, but I get the same error. Do you have any idea? Except the mysql and java connector do I have to download anything else so that MATLAB and SQL get connected? Thanks in advance.

Sign in to comment.


Walter Roberson
Walter Roberson on 1 Mar 2018
If you are on MS Windows you need to Run As Administrator in order to install TMG, as it tries to directly update MATLAB's classpath.txt file.
If you are on Linux or MATLAB then you need to make fullfile(matlabroot, 'toolbox', 'local', 'classpath.txt') writable, which might require that you sudo chmod +w the file.

Tags

Community Treasure Hunt

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

Start Hunting!