How to connect to mysql in tutor dev with IDE

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?

Figured it out,

Hi @borgdrone7

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

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:

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.