# How to connect to mysql in tutor dev with IDE

**URL:** <https://discuss.openedx.org/t/how-to-connect-to-mysql-in-tutor-dev-with-ide/12567>\
**Category:** Site Operations Help\
**Created:** [March 20, 2024, 1:02am UTC](https://discuss.openedx.org/t/how-to-connect-to-mysql-in-tutor-dev-with-ide/12567 "2024-03-20T01:02:33Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![borgdrone7](https://avatars.discourse-cdn.com/v4/letter/b/f14d63/32.png) [@borgdrone7](https://discuss.openedx.org/u/borgdrone7)\
**Post date:** [March 20, 2024, 1:02am UTC](https://discuss.openedx.org/t/how-to-connect-to-mysql-in-tutor-dev-with-ide/12567/1 "2024-03-20T01:02:33Z")

</div>

Hi,

In tutor (17) there is no definition for container for mysql so I cannot see how to connect to it from IDE. In local deployment it is easier as the service is in yml file but for dev it’s hard to find a way.  
For dev it is very important to be able to access the DB using IDE.  
Any solution?

---

<div class="post-metadata">

**Author:** ![borgdrone7](https://avatars.discourse-cdn.com/v4/letter/b/f14d63/32.png) [@borgdrone7](https://discuss.openedx.org/u/borgdrone7)\
**Post date:** [March 21, 2024, 1:28am UTC](https://discuss.openedx.org/t/how-to-connect-to-mysql-in-tutor-dev-with-ide/12567/2 "2024-03-21T01:28:02Z")

</div>

Figured it out,

---

<div class="post-metadata">

**Author:** ![chintan](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.openedx.org/chintan/32/52_2.png) [@chintan](https://discuss.openedx.org/u/chintan)\
**Post date:** [March 21, 2024, 12:07pm UTC](https://discuss.openedx.org/t/how-to-connect-to-mysql-in-tutor-dev-with-ide/12567/3 "2024-03-21T12:07:18Z")

</div>

Hi @borgdrone7

You can post your solution here, so that it’ll help others who are facing same sort of issues.

---

<div class="post-metadata">

**Author:** ![borgdrone7](https://avatars.discourse-cdn.com/v4/letter/b/f14d63/32.png) [@borgdrone7](https://discuss.openedx.org/u/borgdrone7)\
**Post date:** [March 28, 2024, 3:35am UTC](https://discuss.openedx.org/t/how-to-connect-to-mysql-in-tutor-dev-with-ide/12567/4 "2024-03-28T03:35:15Z")

</div>

Sure, the misleading thing is that tutor actually uses mysql service from local when you start dev. So in order to connect to mysql using IDE when you start `tutor dev start` you actually need to change env/local/docker-compose.yml. So you can do it like this:

```auto
Edit env/local/docker-compose.yml and add this to mysql service: 

    ports:
      - "3307:3306"

```

Then just use root password in config.yml and connect in IDE on localhost:3307.

Also, editing directly docker-compose.yml is not permanent solution as it will be overwritten on tutor local launch. If you want to persist the change you will have to do it with custom tutor plugin. But for concessional debugging this is good enough.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex020/uploads/openedx/original/2X/e/e0015f89e879bc75925b71fd11133ab15fe98297.png) [@system](https://discuss.openedx.org/u/system)\
**Post date:** [June 26, 2024, 3:35am UTC](https://discuss.openedx.org/t/how-to-connect-to-mysql-in-tutor-dev-with-ide/12567/5 "2024-06-26T03:35:51Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
