Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Jira SW - Updade from 7.13 to 8.0 - MySql considerations

Schups February 26, 2019

Ref. https://confluence.atlassian.com/adminjiraserver/connecting-jira-applications-to-mysql-5-7-966063305.html

I see from the doc above that new parameters are to be added to the my.cnf file.

 

The default charset changes to utf8mb4 for the MySql instance; but the database of Jira is currently still in utf8 (because it was created this way). Do I need to do anything to switch it to utf8mb4?

character_set_server=utf8mb4

 

1 answer

1 accepted

0 votes
Answer accepted
Alexis Robert
Community Champion
February 26, 2019

Hi @Schups , 

 

I believe utf8mb4 is only to support emojis - if you don't plan on using them, you can keep the current charset and Jira will work fine with these settings.

 

Let me know if this helps, 

 

--Alexis

Schups February 26, 2019

Clear, thank you Alexis.

But, what if I want to change the charset of the db so to have the emojis supported? How to proceed in this case?

Alexis Robert
Community Champion
February 26, 2019

Hi @Schups , 

 

there is actually an Atlassian documentation page that explains in detail how to do this: https://confluence.atlassian.com/kb/how-to-fix-the-collation-and-character-set-of-a-mysql-database-744326173.html

 

Keep in mind that this is quite complex and should be done by your database administrator if possible.

 

--Alexis

Schups February 26, 2019

Thank you Alexis, I didn't find this KB before. I based myself on a similar one: https://confluence.atlassian.com/jirakb/emojis-and-special-characters-for-jira-with-mysql-952604493.html

 

For changing charsets and collations, I proceeded like this:

  • Stopped jira service
  • Dumped db structure (no data) via mysqldump
  • Dumped db data (no structure) via mysqldump
  • Updated database charset and collation.
  • Edited the structure dump, replaced all the charsets and collations via the "find/replace all". Modified all the utf8 to ut8mb4, and all the utf8_bin to uf8mb4_bin
  • Reimported structure, then reimported data
  • Started service again, checked catalina.out for warnings

 

Before emojis and other special chars were supported, I had also to update the dbconfig.xml via the config.sh utility. Via diff I find that it removed the characterEncoding parameter from the mysql connection string. I assume it takes advantage of the character_set_server parameter added to the my.cnf file (ref. Jira 8 upgrade procedure).

 

Emojis are now supported (expect for the activity feeds, which is a known issue reported on the KB I linked above).

 

Judging from the KB you posted, what I did seems to be equivalent. Do you agree?

Schups February 26, 2019

Thank you Alexis, I didn't find this KB before. I based myself on a similar one: https://confluence.atlassian.com/jirakb/emojis-and-special-characters-for-jira-with-mysql-952604493.html

 

For changing charsets and collations, I proceeded like this:

  • Stopped jira service
  • Dumped db structure (no data) via mysqldump
  • Dumped db data (no structure) via mysqldump
  • Updated database charset and collation.
  • Edited the structure dump, replaced all the charsets and collations via the "find/replace all". Modified all the utf8 to ut8mb4, and all the utf8_bin to uf8mb4_bin
  • Reimported structure, then reimported data
  • Started service again, checked catalina.out for warnings

 

Before emojis and other special chars were supported, I had also to update the dbconfig.xml via the config.sh utility. Via diff I find that it removed the characterEncoding parameter from the mysql connection string. I assume it takes advantage of the character_set_server parameter added to the my.cnf file (ref. Jira 8 upgrade procedure).

 

Emojis are now supported (expect for the activity feeds, which is a known issue reported on the KB I linked above).

 

Judging from the KB you posted, what I did seems to be equivalent. Do you agree?

Alexis Robert
Community Champion
February 27, 2019

Hi @Schups ,

 

it's pretty much the same, the only difference is that the KB explains how to do this directly in MySQL with ALTER statements, where you went for a more manual approach with the find/replace in the dumps.

But in the end, pretty much the same yeah.

Suggest an answer

Log in or Sign up to answer