# Traefik tcp proxy single port multi-environment

**URL:** <https://community.traefik.io/t/traefik-tcp-proxy-single-port-multi-environment/5607>\
**Category:** Traefik v2\
**Tags:** tcp, kubernetes-ingress\
**Created:** [April 21, 2020, 8:03am UTC](https://community.traefik.io/t/traefik-tcp-proxy-single-port-multi-environment/5607 "2020-04-21T08:03:35Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![xxlaila](https://sea2.discourse-cdn.com/flex020/user_avatar/community.traefik.io/xxlaila/32/1471_2.png) [@xxlaila](https://community.traefik.io/u/xxlaila)\
**Post date:** [April 21, 2020, 8:03am UTC](https://community.traefik.io/t/traefik-tcp-proxy-single-port-multi-environment/5607/1 "2020-04-21T08:03:35Z")

</div>

I used traefik 2.2 version. The toml format is dynamically configured. I created dev, test, and uat multiple namespaces on the kubernetes platform to distinguish my environment. Under each namespace, there is a mysql service. I want to use traefik to proxy mysql.  
When I proxy dev, there is no problem, I can connect to mysql

```auto
apiVersion: traefik.containo.us/v1alpha1
kind: IngressRouteTCP
metadata:
   name: dev-traefik-tcp
   namespace: kube-dev
spec:
   entryPoints:
     -mysql
   routes:
   -match: HostSNI (`middle.dev.test.com`)
     services:
     -name: mysql5-6
       port: 3306

```

Then I added test.

```auto
apiVersion: traefik.containo.us/v1alpha1
kind: IngressRouteTCP
metadata:
   name: test-traefik-tcp
   namespace: kube-test
spec:
   entryPoints:
     -mysql
   routes:
   -match: HostSNI (`middle.test.test.com`)
     services:
     -name: mysql5-6
       port: 3306

```

After the creation of dev and test, the connection to mysql is lost. In this scenario, how should I configure it?

> <https://github.com/containous/traefik/issues/6708>
>
> I used traefik 2.2 version. The toml format is dynamically configured. I created dev, test, and uat multiple namespaces on the...
