[Python] Struggling with Vitess MySQL Integration: Issue

Discussão em 'Python' iniciado por Stack, Janeiro 24, 2025.

  1. Stack

    Stack Membro Participativo

    I’m working with Vitess on my server and trying to integrate it with a simple demo Django project using the Vitess MySQL databases. I’ve already set up Vitess using Docker and have successfully logged into MySQL within the Vitess container, and for the container, I used to create a subnet so the container has a separate IP. However, I’m running into an issue when trying to connect to a vitess MySQL server from outside container; even on the same server, it will not connect, showing error only

    -> step 1: Connect the vitess mysql server from outside container with the same server.

    ERROR IMAGE: enter image description here

    -> In that command , i use to connect host as container IP because I am trying to connect vitess MYSQL server from outside the container If I use localhost it will not connect inside container, localhost working fine inside the container but outside we must pointing the container IP then only it connect from outside.

    -> Step 2: Connectiong or migrating from Django application

    ERROR IMAGE: enter image description here

    -> in this django application tring to migrate the data to vitess mysql server it will show this error i tring all aspect of solution but i am not able fix this error. and the django intslef i created on same server and also i create another same project on my localmachine i am facing this same error only.

    setting.py(setup)

    DATABASES = {
    'default': {
    'ENGINE': 'django.db.backends.mysql',
    'NAME': 'test_keyspace',
    'USER': 'vt_dba',
    'PASSWORD': '',
    'HOST': '172.20.0.10',
    'PORT': '15003',
    }


    -> I Am completely new from Vitess, so i followed vitess official documentation.

    Continue reading...

Compartilhe esta Página