Wordpress installation not accepting AWS RDS credentials

Solution 1:

After some Googling and asking around I was advised to check SELinux settings and found the problem after running this command:

sudo tail -100 /var/log/audit/audit.log | audit2why

which returns this:

type=AVC msg=audit(1525088932.314:74428): avc:  denied  { name_connect } for  pid=14435 comm="httpd" dest=3306 scontext=system_u:system_r:httpd_t:s0 tcontext=system_u:object_r:mysqld_port_t:s0 tclass=tcp_socket

    Was caused by:
    One of the following booleans was set incorrectly.
    Description:
    Allow httpd to can network connect

    Allow access by executing:
    # setsebool -P httpd_can_network_connect 1
    Description:
    Allow httpd to can network connect db

    Allow access by executing:
    # setsebool -P httpd_can_network_connect_db 1

and after running the advised command I was then able to proceed with the installation, I did have to follow some further Wordpress instructions and create the wp-config.php file manually.

This excellent post helped me a lot.