Comments (4)
There is a work-around using the database toolbox.
Another method is using a method suggested in http://stackoverflow.com/questions/24438359/connecting-matlab-and-mysql-with-the-jdbc-driver
My new and working (for me) mysql_dbconnect.m looks like this
function [dbconnection, errmsg] = mysql_dbopen(serverhost, dbname, uname, pword)
javaaddpath('/home/philip/work/CompEngineMatlab/Database/mysql-connector-java-5.1.34-bin.jar')
% Open database
errmsg = []; % error message
% Now try to connect
try
d = com.mysql.jdbc.Driver;
dburl = sprintf('jdbc:mysql://%s/%s', serverhost, dbname);
props = java.util.Properties;
props.put('user',uname); props.put('password',pword);
dbconnection = d.connect(dburl,props);
catch le
fprintf(1,'Error connecting to the database ''%s'' at ''%s'':\n%s\n',dbname,serverhost,le.message);
fprintf(1,['Perhaps an incorrect username (''%s'') and password (''%s'') combination?\n'], uname, pword);
dbconnection = [];
% Not really a Matlab 'error' -- just print the suspected problem to screen
end
And it works like a charm. I think the problem lies with the
java.lang.Class.forName('com.mysql.jdbc.Driver', true, cl)
method. But that is just gut feeling
from hctsa.
The mysql_dbconnect.m seems to create a memory issue with java when running on multiple timeseries on my machine which results in a complete freeze of matlab.
java.lang.OutOfMemoryError: PermGen space
from hctsa.
Running out of memory usually happens when you're trying to retrieve a huge set of time series/operations. Matlab needs to keep the whole retrieval in memory, and it has a hard limit on this. The java heap size can be increased in the Matlab preferences:
(A related problem is exceeding the max_allowed_packet, and can be adjusted by changing the number of chunks for SQL_add_chunked: cf. lines 364--378 in SQL_add)
from hctsa.
This is now fixed -- mysql_dbopen uses the database toolbox if a license is available, otherwise reverts to the original implementation.
from hctsa.
Related Issues (20)
- Feature computed separately different from TS_DataMat HOT 1
- Multiple group assignment TS_LabelGroups HOT 1
- Warning: No available confusion matrix plotting functions HOT 1
- TS_GetIDs returns brace indexing error HOT 5
- Wrong_TS_Classify HOT 3
- will it work for multivariate time series HOT 1
- Error when running TS_LocalClearRemove HOT 1
- Multichannel EEG analysis HOT 1
- Consider a cloud CI service HOT 1
- nn_prepare.m as a function is not supported and a whole host of other errors HOT 8
- Not able to skip User input "y" in TS_Init HOT 3
- Init only with notLengthDependent features HOT 1
- calling hctsa from python with matlab engine HOT 2
- TS_Classify produces an "Unrecognized function or variable 'foldLosses'" error when trying to save the classifier HOT 3
- Typo in TS_Classify and errors running 'simpleNull' = false in ComputeCVAccuracies? HOT 1
- compile_mex error from range_search.cpp file HOT 1
- Error using compile_mex HOT 3
- Multichannel EEG signal analysis HOT 1
- TS_Cluster produces an 'Unknown distance metric: 'corr_fast''error HOT 2
- parallel operation HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hctsa.