I found the solution. It is under the getsebool command.
getsebool -a | grep httpd
It’s under httpd_can_network_connect_db –> on
This is OFF by default. To turn it on run sudo setsebool -P httpd_can_network_connect_db on
Full details are outlined at this article on serverfault.
https://serverfault.com/questions/583797/cant-login-to-remote-mariadb-server-with-phpmyadmin-but-works-in-shell