Error occurs as Migrate/Create new MySQL database instance in BitBucket Edited

To Migrate MySQL on Bitbucket I have followed the below instruction and ended up with an error.

Step 01: Install J driver in Bitbucket
download latest driver “mysql-connector-java-5.1.44” to the Bitbucket folder, 

Step 02: Install MySQL and create database with privilege 
GRANT ALL PRIVILEGES ON bitbucket.* TO 'root'@'' IDENTIFIED BY 'xxx';

Step 03: Migrate MySQL from Bitbucket I) Login to the Bitbucket and select migrate database. II) Click on Migrate database.

III) Once required fields are filled out, click on Test button to test the connection. IV) Clicking on Start Migration ends up with a MySQL error.

The schema could not be created.

You can't specify target table 'cwd_user' for update in FROM clause [Failed SQL: UPDATE bitbucket.cwd_user SET external_id = NULL WHERE id IN (SELECT FROM ( SELECT FROM cwd_user b JOIN (SELECT c.directory_id, c.external_id FROM cwd_user c GROUP BY c.directory_id, c.external_id HAVING COUNT(*) > 1 ) sq on b.directory_id = sq.directory_id AND b.external_id = sq.external_id ) a )]

0 answers

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Piotr Plewa
Published Dec 27, 2017 in Bitbucket

Recipe: Deploying AWS Lambda functions with Bitbucket Pipelines

Bitbucket Pipelines helps me manage and automate a number of serverless deployments to AWS Lambda and this is how I do it. I'm building Node.js Lambda functions using node-lambda&nbsp...

1,872 views 1 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