MariaDB.......mysql_native_password

Hi,
I have installed OpenEMR 5.0.2 version on virtual machine. And it was working fine locally. when we moved this VM in DMZ to access database remotely. but after moving in DMZ it is not accessible from that VM or not from outside the network.
I was getting error like this server is not allowed to access mariaDB so i granted all permission to that user. at least now i can connect to the database. but not able to access it.
Now getting error massage like mariaDB… mysql_native_password connection to host lost.

can anyone please help me for this.

Thanks