<p>I have a got a kubernetes mysql pod which is exposed as a nodePort like shown below</p>

<pre><code>apiVersion: v1
kind: Service
metadata:
  name: demo-mysql
  labels:
    app: demo
spec:
  type: NodePort
  ports:
    - port: 3306
      nodePort: 32695

</code></pre>

<p>I am trying to access this mysql server using the command below</p>

<pre><code>mysql -u root -h 117.213.118.86 -p 32695

</code></pre>

<p>but I get this error</p>

<pre><code>ERROR 2003 (HY000): Can't connect to MySQL server on '117.213.118.86' (111)
</code></pre>

<p>What am I doing wrong here ?</p>

<p>try this</p>

<pre><code>mysql -u root --password=&lt;PASSWORD&gt; -h &lt;CLUSTER_HOST&gt; --port=32695
</code></pre>
