Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,461,319
Community Members
 
Community Events
176
Community Groups

connecting crowd to mysql - why aren't all the tables being created?

I'm connecting my crowd instance to a mysql database and am getting some errors in the logs like:

2018-06-28 17:43:57,724 http-nio-8095-exec-7 ERROR [engine.jdbc.spi.SqlExceptionHelper] Table 'crowd.cwd_property' doesn't exist
2018-06-28 17:43:57,782 http-nio-8095-exec-7 ERROR [engine.jdbc.spi.SqlExceptionHelper] Table 'crowd.cwd_cluster_job' doesn't exist

when I look in mysql, those specific tables do appear to be missing:

aembree @ dev : ~ [ 18:00 ] >>> sudo mysql -B --execute 'use crowd; show tables;'
Tables_in_crowd
CWD_DATABASECHANGELOG
CWD_DATABASECHANGELOGLOCK
cwd_app_dir_default_groups
cwd_app_dir_group_mapping
cwd_app_dir_mapping
cwd_app_dir_operation
cwd_application
cwd_application_alias
cwd_audit_log_changeset
cwd_audit_log_entity
cwd_audit_log_entry
cwd_cluster_heartbeat
cwd_cluster_message
cwd_cluster_message_id
cwd_directory
cwd_directory_operation
cwd_expirable_user_token
cwd_granted_perm
cwd_group
cwd_group_attribute
cwd_membership
cwd_synchronisation_status
cwd_synchronisation_token
cwd_token
cwd_tombstone
cwd_user
cwd_user_attribute
cwd_user_credential_record
cwd_webhook
hibernate_unique_key

why were some tables created, but others weren't? I confirmed I have 'transaction-isolation = READ-COMMITTED' set and the database engine is innoDB by default.

1 answer

1 accepted

0 votes
Answer accepted
Andy Heinzer Atlassian Team Jun 29, 2018

Is this a new installation of Crowd? Or is this an upgrade? What version is this?

I would want to confirm that you are following this guide if using MySQL: https://confluence.atlassian.com/crowd/mysql-4030924.html

When the database is created, are you using the utf8 encoding and the utf8_bin collation?

You can detect the cause for this using the below SQL statements, replacing <DATABASE_NAME> in each:

Make sure to set MySQL to use the information_schema DB to make the queries below work. Use this command "Use information_schema" before and replace <DATABASE_NAME> with confluence database name you want to check.

SELECT schema_name, default_character_set_name, default_collation_name FROM schemata WHERE schema_name = '<DATABASE_NAME>' AND (default_character_set_name <> 'utf8' OR default_collation_name <> 'utf8_bin');
SELECT table_name, table_collation, engine FROM tables WHERE table_schema = '<DATABASE_NAME>' AND table_collation <> 'utf8_bin';
SELECT table_name, column_name, character_set_name, collation_name FROM columns WHERE table_schema = '<DATABASE_NAME>' and data_type in ('varchar', 'text') and (character_set_name <> 'utf8' OR collation_name <> 'utf8_bin');

If any rows are returned in any of those three queries, then there is something in the database which is either not set to use utf8 encoding, or does not have the utf8_bin collation.

Also, it could be that the user account Crowd is setup to use might not have been granted all the rights to create the necessary tables/relations, but if that happens then we typically should see that in the logs when first started.

looks like I forgot the collation! thanks

Suggest an answer

Log in or Sign up to answer
TAGS

Atlassian Community Events