"Unknown system variable 'storage_engine'" JIRA 7.0 and MySQL 5.7.9

Semen Pleshivtsev November 3, 2015

Hi!

I'm trying to install JIRA 7.0 on MySQL  5.7.9 and connector "mysql-connector-java-5.1.37-bin.jar".

When I'm trying to connect to MySQL DB, error message appears:

---

"Unknown system variable 'storage_engine'"

---

This variable is NOT present in my.ini. Insead, I'm using default-storage-engine = InnoDB.

Well, system variable storage_engine is deprecated "as of MySQL 5.5.3".

Should I use version of MySQL below 5.5.3 ?

 

Best regards, Semyon.

8 answers

13 votes
yurii-bitbucket December 26, 2015

i got it working

in short see my fork : https://github.com/yurii-github/mysql-connector-j

------------------------

changing JIRA was too hard for me, too many places with hardcoded storage_engine parameter, so i did a change into mysql connector itself - i'm replacing deprecated variable in connection constructor. like this

https://github.com/yurii-github/mysql-connector-j/commit/47199bf3ef4a9c3db6eb3a1858fc53c980d8a439

built snapshot is in repo too: https://github.com/yurii-github/mysql-connector-j/blob/release/5.1/mysql-connector-java-5.1.38-SNAPSHOT-bin.jar

or you can build it yourself etc.

 

just note, it was built without jdk1.6. Also no warranties etc, you know smile

 

hope it helps and doesn't crash for you, it works for me though.

 

regards,

Yurii

MattS
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 7, 2016

That's a cool piece of work but where else was storage_engine hard coded? https://answers.atlassian.com/questions/32023132/answers/32522729 looked like you could just tweak dbconfig.xml no?

yurii-bitbucket January 8, 2016

unfortunately i didnt save search progress. as i remember, just changing dbconfig didn't help me. i found hardcoded "storage_engine" about 4 times. some in text files INF or something, some in plugins in jar files. but even after i repackaged jar files it was still failing with this error. i think some hardcoded link(s) still exist in obfuscated compiled code, haven't look too much into this as connector license allows me to modify its code and in one place. anyway, if changing config file works for you - great. i wonder why it didnt work for me then regards

Emil Georgiev June 20, 2016

Thank you!!!  After 2 days of searching and trying to get around this, I finally was able to get a successful connection with your jar!

dvittor July 9, 2016

Legend Yurii K. Thank you. Your mysql-snapshot.jar worked.

tommy yang September 7, 2016

Modify mysql.properties and dbconfig.xml doesn't take effect. Use Yurii's script solve the problem. Thank you! Yurii K.

Ubuntu 16.04 Mysql 5.7.13

Mika Nokka November 26, 2016

Thank you! My JIRA broke after Ubuntu 14->16 upgrade. Using your .jar variant fixed the problem

Metin Savignano January 18, 2017

Warning: This solution worked for me for about two months, but then I had NPE problems in a JIRA function which I had not used before. It took me a while to find out that this modified driver jar caused the problems. After that I re-installed the original driver and used Vin's solution listed below instead. All works fine now.

DoskulovDS September 29, 2018

Thank you so much!!!!

5 votes
Vin November 21, 2015

Here are the steps to get around:

  1. If you are doing this the first time, copy the sample dbconfig.xml from https://confluence.atlassian.com/adminjiraserver070/connecting-jira-applications-to-mysql-749382640.html, else edit the existing dbconfig.xml as an administrator. It is in the JIRA HOME folder.
  2. Search for <url> tag in the file.
  3. Remove the text: "sessionVariables=storage_engine=InnoDB" (sans double-quotes).
  4. Ensure that the server and database name match the ones specified during installation.
  5. Restart JIRA.
Frank Adcock May 12, 2016

sudo vi /opt/atlassian/jira/atlassian-jira/WEB-INF/classes/database-defaults/mysql.properties

Remove the text as stated above including the preceding & character.

 

 

vellotis June 5, 2016

Thank you @Vin.

To the others: It is not needed to modify connector. Just modify the dbconfig.xml.

 

Daniel Duerr June 15, 2016

@Frank Adcock nailed the solution for a new JIRA install, since it won't look at the dbconfig.xml file when the setup wizard is wanting to be run.

Vectalis June 21, 2016

warning Actually the is that dbconfig.xml does not exist when running the installation for the first time

either

  • copy and tune the sample as suggested above or
  • using the config tool (in JiraInstallation/bin) and generate one... then tune it (to remove the "storage_engine..." part
David Rhoderick
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 19, 2016

I upgraded to Ubuntu 16.04 and that upgraded my MySQL, which caused the error.  I tried what Vin wrote and also what @Frank Adcock wrote and I'm stuck on the setup page.  Is my only option to edit the MySQL connector if migrating from something before?

Alexander Oberhauser August 26, 2016

Hey guys! Thank you very much for your tips, worked for me like charm. Had to update Ubuntu to 16.04 from 14.04 and this did the trick! I did the following:

  1. I removed the "InnoDB" inside dbconfig.xml 
  2. Next I also removed it via ${JIRA_APPLICATION_DIR}/atlassian-jira/WEB-INF/classes/database-defaults/mysql.properties. Please refer to http://dba.stackexchange.com/a/138423 for further details.

Now everything seems to be working fine!

Like Attila Odry likes this
aamirmunir October 18, 2016

Hi guys I did the same but after doing this it says unable to test connection. Any suggestion?

aamirmunir October 19, 2016

Hi All,

 

Please I am kind of stuck here and really need some quick help.

I am using MySQL 5.7.15

and JIRA 7.2.3

I did remove "sessionVariables=storage_engine=InnoDB" from dbcongif.xml (that I created using the sample), I also try to remove it from mysql.properties file under /atlassian-jira/WEB-INF/classes/database-defaults/


but no luck when I click Test connection it says : Unable to test the connection.

Any quick help really appritiated.


Thank you jiraCapture.JPG

SABVARX February 22, 2017

Thanks a lot for that great hint, Vin! I just had to remove the text while upgrading to mysql 5.7 for my JIRA 7.3 installation.

Metin Savignano March 17, 2017

In JIRA 7.3 (which supports mySQL 5.7), storage_engine has become default_storage_engine. I haven't tried changing the variable in JIRA 6.4, but I suppose this would be the correct way to solve this problem.

rordonez January 16, 2018

Still a problem in 2018, with the upgrade from Ubuntu 14 LTS to 16 LTS. :(

To save someone else some time: dbconfig.xml is at /var/atlassian/application-data/jira/dbconfig.xml 

Attila Odry December 3, 2018

Thanks for all, especially for @DudaevAR Oberhauser  your clean solution / links worked for me too.

I upgraded my server from Ubuntu 14.04.5 LTS and JIRA 6.4.11 to Ubuntu 18.4 LTS, same Jira version (will update that later), the problem popped up at 16.x LTS, but I just skipped, went to latest 18.4 and fixed as described in this link:

http://dba.stackexchange.com/a/138423

 
You saved my day, well night or morning :)

Thanks again guys!

2 votes
Matt White November 4, 2015

Yah, same issue here. rolled back to mysql 5.6.27 and it is happy now.

Maxim Lebedev January 2, 2017

Meet with a same problem. And it has been fixed by rollback to to mysql 5.6.27

 

Samrat Basra June 29, 2017

yes. it will work with mysql 5.6.

1 vote
Fabian Wallentowitz November 3, 2015

same here....

 

the mysql connector url should be defineable as in the confluence setup...

0 votes
Gyana Ranjan January 25, 2017

Thanks a lot.. It works!

0 votes
Paul Stewart December 9, 2016

Just got burned by this myself.. 5.7 has been out for quite some time and was surprised to see this issue come up.

0 votes
MattS
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 4, 2015

There's a feature request at jac for this. 

MattS
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 7, 2016

Suggest an answer

Log in or Sign up to answer