# Tutor-based Open edX local deployment failing after git pull — MySQL connection error during migration

**URL:** <https://discuss.openedx.org/t/tutor-based-open-edx-local-deployment-failing-after-git-pull-mysql-connection-error-during-migration/17358>\
**Category:** Site Operators\
**Tags:** how-to, tutor\
**Created:** [October 11, 2025, 8:15am UTC](https://discuss.openedx.org/t/tutor-based-open-edx-local-deployment-failing-after-git-pull-mysql-connection-error-during-migration/17358 "2025-10-11T08:15:32Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Suriya\_Stark](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.openedx.org/suriya_stark/32/8950_2.png) [@Suriya\_Stark](https://discuss.openedx.org/u/Suriya_Stark)\
**Post date:** [October 11, 2025, 8:15am UTC](https://discuss.openedx.org/t/tutor-based-open-edx-local-deployment-failing-after-git-pull-mysql-connection-error-during-migration/17358/1 "2025-10-11T08:15:32Z")

</div>

After updating my local Open edX environment with the latest code from the git repository my **Tutor- ver 20.0.1 based local deployment on Ubuntu** started failing during migrations.

When I run:

```auto
tutor local launch

```

or

```auto
tutor local run lms ./manage.py migrate

```

the process stops with this error:

```auto
django.db.utils.OperationalError: (2013, 'Lost connection to MySQL server during query')

```

* * *

### ⚙ **Environment Details:**

- **OS:** Ubuntu (local system)

- **Deployment type:** Tutor local (development mode)

- **Tutor version:** 20.0.1

- **Database:** MySQL (running inside Tutor Docker container)

* * *

### 🧩 **What I Tried:**

1. Checked container status with:

2. Verified connection manually inside container:

3. Error occurs consistently at:

* * *

### 🧰 **Possible Cause (Analysis):**

- The MySQL server inside Tutor may have default configuration limits that are too low for heavy Open edX migrations.

- The `max_allowed_packet`, `wait_timeout`, or `innodb_log_file_size` parameters might need to be increased.

- Docker resource allocation (CPU/RAM) may also be insufficient for running the full Open edX stack locally.

* * *

### 🔧 **Proposed Fix / Next Steps:**

1. Create or edit a custom MySQL configuration:

2. Restart Tutor services:

3. Re-run migrations:

4. Increase Docker resources (CPU ≥ 4 cores, RAM ≥ 8 GB).

* * *

### 📌 **Expected Behavior:**

Open edX migrations should complete successfully and all services (`lms`, `cms`, `mysql`, `caddy`, etc.) should start without MySQL disconnection errors.

### ⚠ **Actual Behavior:**

Migrations fail midway with:

```auto
OperationalError: (2013, 'Lost connection to MySQL server during query')

```

* * *

Help me how to resovle it

i want it intergarion my web and mobile app bypass the login and customization so help me how to resovele it

---

<div class="post-metadata">

**Author:** ![sarina](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.openedx.org/sarina/32/2308_2.png) [@sarina](https://discuss.openedx.org/u/sarina)\
**Post date:** [October 14, 2025, 9:17pm UTC](https://discuss.openedx.org/t/tutor-based-open-edx-local-deployment-failing-after-git-pull-mysql-connection-error-during-migration/17358/2 "2025-10-14T21:17:24Z")

</div>

Hi @Suriya_Stark and welcome. It looks like you used an AI chatbot to compose this post. It’s unclear to me which Open edX version you were previously on before you migrated to 20. Also did you follow the AI’s suggestions in the “Proposed Fix / Next Steps:” and “Possible Cause (Analysis):” sections? Those seem like good things to try.

---

<div class="post-metadata">

**Author:** ![Suriya\_Stark](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.openedx.org/suriya_stark/32/8950_2.png) [@Suriya\_Stark](https://discuss.openedx.org/u/Suriya_Stark)\
**Post date:** [October 15, 2025, 10:19am UTC](https://discuss.openedx.org/t/tutor-based-open-edx-local-deployment-failing-after-git-pull-mysql-connection-error-during-migration/17358/3 "2025-10-15T10:19:54Z")

</div>

Hi

I recently did a git pull to fix the migration issue. Everything’s working fine now. If I face any other issues, I’ll let you know soon. Thank you!
