title: Access mysql running on localhost from minikube
body: <p>I am running some services in minikube and trying to connect to mysql running on localhost(127.0.0.1) on 3306 port. </p>
  
  <p>I read <a href="https://stackoverflow.com/a/43477742/9958058">this</a> and trying to create <code>service</code> and <code>Endpoints</code>. However, when I specify <code>127.0.0.1</code> as IP, it throws error as below:</p>
  
  <p><code>The Endpoints "mysql-service" is invalid: subsets[0].addresses[0].ip: Invalid value: "127.0.0.1": may not be in the loopback range (127.0.0.0/8)</code></p>
  
  <p>my deployment is like below:</p>
  
  <pre><code>---
  apiVersion: v1
  kind: Service
  metadata:
    name: mysql-service
  spec:
    ports:
    - protocol: TCP
      port: 1443
      targetPort: mysql
  
  ---
  apiVersion: v1
  kind: Endpoints
  metadata:
    name: mysql-service
  subsets:
    - addresses:
      - ip: 127.0.0.1
      ports:
      - name: mysql
        port: 3306
  </code></pre>
  
  <p>Please assist me to understand how can I connect to <code>mysql</code> db from <code>minikube</code>.</p>
  
  <p>I have also tried replacing <code>127.0.0.1</code> with public IP of my computer(Don't know why though) and connection was timed out.</p>
  
  <p>Any help or guide towards right direction is appreciated.</p>