<p>I am fairly new to the system. Fortunately Google cloud plateform has a one click setup for master slave mariadb replication which i opted or(<a href="https://console.cloud.google.com/marketplace/details/google/mariadb?q=mariadb" rel="nofollow noreferrer">https://console.cloud.google.com/marketplace/details/google/mariadb?q=mariadb</a>).<br> After which I could login in as root and create a user. I ran the following sql command.</p>

<pre><code>create user 'user'@'localhost' identified by 'password';
</code></pre>

<p>After sucessfully creating the user, If i am inside either master or slave pod i could login in local instance but I could not login from outside those pods or from one pod to another pod in mariadb instances.For loggin I used the following command</p>

<pre><code>mysql -u user -h mariadb-1-mariadb.mariadb.svc.cluster.local -p
</code></pre>

<p>where mariadb-1-mariadb = service and mariadb=namespace<br><br>
I keep on getting error.<br> 
Error 1045(2800): Access denied for the user <br>
Any help is greatly appreciated. I think you might want to read the yaml file on gcp if you are to think about port blocking but I think it shouldn't be that issue.</p>

bedrockelectro
<p>I had issue in creating user. When I tried to login as user, it used to somehow pick up my container ip I am trying to login from. All I needed to do was make user not local host but global with '%' and that solved the issue.</p>

<pre><code>create user 'user'@'%' identified by 'password';
</code></pre>
