Forums

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

My Confluence not startup after try change database Collation in MySQL

Matti Kiviharju
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.
June 25, 2018

My Confluence not startup after try change database Collation in MySQL.

I ran this bash code in command line for to try to fix collation:

#!/bin/bash

# mycollate.sh <database> [<charset> <collation>]
# changes MySQL/MariaDB charset and collation for one database - all tables and
# all columns in all tables

DB="$1"
CHARSET="$2"
COLL="$3"

[ -n "$DB" ] || exit 1
[ -n "$CHARSET" ] || CHARSET="utf8"
[ -n "$COLL" ] || COLL="utf8_bin"

echo $DB
echo "ALTER DATABASE $DB CHARACTER SET $CHARSET COLLATE $COLL;" | mysql -uroot -ppassword

echo "USE $DB; SHOW TABLES;" | mysql -s -uroot -ppassword| (
while read TABLE; do
echo $DB.$TABLE
echo "ALTER TABLE $TABLE CONVERT TO CHARACTER SET $CHARSET COLLATE $COLL;" | mysql -uroot -ppassword $DB
done
)

How to fix this bash script to get Conflunence to startup again?

1 answer

0 votes
Shannon S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 26, 2018

Hi Matti,

In order to properly fix the collation, you'll want to make sure that you've completed exactly the same steps as mentioned on our article:

The Table of Contents at the bottom discusses the set of changes you will need to perform.

Can you be sure that you edited the collation on both a table, column, and database level? 

Thank you!

Regards,

Shannon

Matti Kiviharju
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.
June 27, 2018

Hi,

I do not success with this.

How to set Foreing Key Checks correctly?

Shannon S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 28, 2018

Matti,

This is the way we recommend to set the collation of MySQL in Confluence. What issue did you have following the procedure?

When you ask about foreign key checks, are you having some sort of error message? Can you show us what you're seeing in the logs?

Shannon

Matti Kiviharju
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.
June 30, 2018

Hi,

I just try to change collation with my phpMyAdmin and it not change all tables/columns collation to utf8_bin from utf8_general_ci. I am not sure am I placed foreing key checks to right place on SQL-scripts.

Shannon S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 2, 2018

Matti,

Our suggestion is only to run the changes exactly the way they are outlined in these articles:

Please review each individually and if you're having trouble you may want to reach out to your MySQL server administrator.

Regards,

Shannon

Matti Kiviharju
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.
July 13, 2018

Thanks for this I ask from you if have a questions in future. Now my Confluence works fine because I restored old collation.

Shannon S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 16, 2018

Happy to hear your Confluence is up and running!

Take care,

Shannon

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events