Error installing snomed db

fndtn357 wrote on Saturday, May 26, 2012:

mysql  Ver 14.14 Distrib 5.5.22

Database is not installed.
Click Install button to install database release from the following date: 2012-01-31
(Note it will take 5-10 minutes to fully process after you click Install)

Copying the database file. This will take some time…
Extracting the file. This will take some time…
Loading the files into the database. This will take some time…

ERROR: query failed: Load data local infile ‘/tmp/snomed/SnomedCT_Release_INT_20120131/RF1Release/Terminology/Content/sct1_Concepts_Core_INT_20120131.txt’ into table sct_concepts fields terminated by ‘\t’ ESCAPED BY ‘’ lines terminated by ‘\n’ ignore 1 lines

Error: The used command is not allowed with this MySQL version

fndtn357 wrote on Saturday, May 26, 2012:

Where/what is the function that is called to install the SNOMED database?

bradymiller wrote on Saturday, May 26, 2012:

Hi,

Sounds like you may of found another mysql 5.5 issue.

Pertinent scripts are:
interface/code_systems/standard_tables_manage.php
library/standard_tables_capture.inc (specifically the snomed_import() function)

-brady
OpenEMR

fndtn357 wrote on Saturday, May 26, 2012:

found this line of code in library/standard_tables_capture.inc

if( is_dir($path) && $handle1 = opendir($path)) {
196                     while (false !== ($filename1 = readdir($handle1))) {
197                         $load_script="Load data local infile ‘#FILENAME#’ into table #TABLE# fields terminated by ‘\\t’ ESCAPED BY ‘’ lines terminated by     ‘\\n’ ignore 1 lines   ";

lucky me :wink:

fndtn357 wrote on Saturday, May 26, 2012:

if( is_dir($path) && $handle1 = opendir($path)) {
196 while (false !== ($filename1 = readdir($handle1))) {
197 $load_script="Load data local infile ‘#FILENAME#’ into table #TABLE# fields terminated by ‘\t’ ESCAPED BY ‘’ lines terminated by ‘\n’ ignore 1 lines ";

fndtn357 wrote on Saturday, May 26, 2012:

ok, maybe I should be the one to go through the code and find as much as I can (?) As I was wandering through .sql files I found on line 55 in openemr/sql/athletic_tem_layout.sql a TYPE=

Should I just start making these changes and submitting for review then? I guess it would be best (for me) if each change is a separate push to github … what do you think?

bradymiller wrote on Saturday, May 26, 2012:

Hi,

For these simple changes, suggest just posting the link to the commit/branch on the forums (perhaps just make a mysql 5,5 compliance project thread or something like that), which I (or another Integrator) can then quickly commit to sourceforge. Regarding creating one commit for all changes or one for each change, please feel free to do whatever is easier for you. When you post the link to your code in the forum, I (or another integrator) will then commit your code to sourceforge (just takes me a minute since I don’t need to test it).

As an aside, did you figure out what command from the SNOMED query is no longer supported in mysql5.5?

-brady
OpenEMR

fndtn357 wrote on Sunday, May 27, 2012:

This issue has to do with LOAD DATA LOCAL INFILE
: in order for me to enable installation of snomed I added local-infile=1 to my /etc/my.cnf file in the  section and restarted the mysql server. i disabled this line after i did the installation because there are security issues with this.
So, I am into learning more about this and finding out how to solve this programmatically for the future of our source code if someone can point me in the right direction.

fndtn357 wrote on Sunday, May 27, 2012:

When I disable that line  (local-infile=1 to my /etc/mysql/my.cnf) my top half default screen disappears, so I am re-enabling it for now.

fndtn357 wrote on Sunday, May 27, 2012:

Starting to get a little hasty in my comments here - it looks like my tunnel needs to be restarted. I’ll post more later about this “line” and disabling it.