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

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

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

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?

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

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!

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

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

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

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.

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.

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

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

 

 

Thank you @Vin.

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

 

@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.

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

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?

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!

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

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

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.

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.

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 

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

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

 

yes. it will work with mysql 5.6.

same here....

 

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

0 vote

There's a feature request at jac for this. 

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

Thanks a lot.. It works!

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published Jun 14, 2018 in Jira Service Desk

How the Telegram Integration for Jira helps Sergey's team take their support efficiency to the bank

...+ reading Fantasy). The same is true for him at the bank he works for: Efficiency is key when time literally equals money. Read on to learn how Sergey makes most of the time he has by...

503 views 3 5
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you