Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MySQL/linux case sensitive compatibility #260

Open
fl0f opened this issue Jan 27, 2016 · 4 comments
Open

MySQL/linux case sensitive compatibility #260

fl0f opened this issue Jan 27, 2016 · 4 comments

Comments

@fl0f
Copy link

fl0f commented Jan 27, 2016

Hi all,

I use "LittleBear_ODM_1.1.1_MySQL.sql" example database with linux 64bit based platform. After executing this sql code, database was created and I could explore it (through phphmyadmin). Launching ODMTools, I give database coordinates and application tries to connect, unsuccessfully. Issue was about table names which were all lower case whereas ODMTools expected upper case like "DataValues" instead of "datavalues". So I changed all table names (except for "seriescatalog" which was still expected lower case).

Then ODMTools opened successfully and I could explore all the data series. I then tried to make some edits (see also "Lasso widget disabled " issue).

After saving edits, ODM could retrieve new variable (with Quality control level set to 1) in table "seriescatalog" but no data were shown on graph. In fact, these data had been written in a new table called "datavalues". This table has been created by ODMTools at the time I saved my edits.

I could fix this issue by changing line 525 in file in odmtools/odmservices/series_service.py to :

values.to_sql(name="DataValues", if_exists='append', con=self._session_factory.engine, index=False)  ## FAP 160127

instead of :

values.to_sql(name="datavalues", if_exists='append', con=self._session_factory.engine, index=False)

Please find attached the file I modified in Pull request "MySQL/linux case sensitive compatibility"
Best regards,
Florent

@cdesyoun
Copy link

@fl0f I got this issue before, loading LBR data into MySQL DB.
I did disable MySQL case sensitive with table names in ubuntu linux as follows:

$ sudo emacs /etc/mysql/my.cnf
in this file, add this line "lower_case_table_names=1",

[mysqld]
#
# * Basic Settings
#
lower_case_table_names = 1
user            = mysql

and then restart mysql server, 
$ sudo service mysql restart

@fl0f
Copy link
Author

fl0f commented Jan 28, 2016

Ok, thanks for the trick. However, there is not a long way to get your soft fully case sensitive compatible

@valentinedwv
Copy link
Member

sudo sed -i '/[mysqld]/a lower_case_table_names = 1 ' /etc/mysql/my.cnf

This is the way to make MySQL behave in an SQL compliant manner across all the Operating Systems that MySQL supports.

@AmberSJones
Copy link
Member

reference issue #161

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants