The database setup is not supporting utf8mb4

刘晓宝
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
February 19, 2019

Mysql Version 5.7.23 On MAC

I already set database character "utf8",but still have error "The database setup is not supporting utf8mb4"

3 answers

1 accepted

0 votes
Answer accepted
Amith Mathur _Appfire_
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.
February 20, 2019

Hi @刘晓宝 , 

What is the version of JIRA you are using? 

However, you can follow the steps from this link to set the correct collation format. Also, please verify the supported platforms for JIRA from here.

If you are still seeing the error, please share the exact error message from the logs. 

Thanks,
Amith Mathur

1 vote
David Cardinal October 19, 2019

Help!

I have the same issue, but the documentation suggested by @Amith Mathur _Appfire_ doesn't help!

When I run the following query on MySQL on my database:

SELECT @@character_set_database, @@collation_database;

I get:

+--------------------------+----------------------+
| @@character_set_database | @@collation_database |
+--------------------------+----------------------+
| utf8mb4 | utf8mb4_bin |
+--------------------------+----------------------+

Which leads me to believe the character sets are correct. Using Mysql 5.7.27, Jira 8.4.1 on Windows Server Core 2016.

Exact error is: 

Database: We've found an error in MySQL supported version!

The database setup is not supporting utf8mb4
See our documentation for more information on setting up MySQL 5.7.

Sean M
Contributor
December 31, 2019

I was also having this issue but got it working eventually. There are a couple of things to check.

Stop jira before making any changes.

First, check that the dbconfig.xml file in your Jira home directory says '<database-type>mysql57</database-type>' -- the '57' matters. If you're upgrading from an older system you might not have that.

Second, check your MySQL server configuration file, wherever it may be. On my system it is /etc/mysql/mysql.conf.d/mysqld.cnf.

Confirm you have the following line in there somewhere

character_set_server=utf8mb4

Restart mysqld, then jira. Any luck?

Like # people like this
Tim Stark
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 18, 2020

I was installing JIRA on MySQL 5.7.29 and having the same problem.  Your changes, plus making sure that the jiradb schema was set to utf8mb4_bin vs. utf8mb4_default made all the difference.  I made those changes and then restarted MySQL and then JIRA (sudo systemctl restart mysql followed by sudo systemctl restart jira) and it worked!!!

Thank you so much!

robert.nadon
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.
May 20, 2020

Sometimes the only choice is for MYSQL (no choice for MYSQL 5.7+) if installing from an older Jira when selecting Database type. the solution is to use utf8 and then upgrade and then switch to utf8mb4

0 votes
ninghongju October 26, 2023

hi everyone,

       The permissions of the file(/etc/my.cnf)  must be 644, check it.

This is my file(/etc/my.cnf), you can use it.  :D


[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock

symbolic-links=0

log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid

default-storage-engine=INNODB

character_set_server=utf8mb4
collation_server=utf8mb4_bin

innodb_default_row_format=DYNAMIC
innodb_large_prefix=ON
innodb_file_format=Barracuda
innodb_log_file_size=2G

max_allowed_packet=200M

transaction-isolation=READ-COMMITTED

Suggest an answer

Log in or Sign up to answer