Centos – Give Tomcat access to Mysql/MariaDB

To see all Tomcat options
getsebool -a | grep tomcat

To set Tomcat access to database
setsebool tomcat_can_network_connect_db 1

SELinux workaround

Give Tomcat network access.

Error message
Could not connect to address=(host=)(port=3306)(type=master) : Permission denied (connect failed)

Tomcat have no access to file system

ps -eZ | grep tomcat_t

yum install policycoreutils-python

semanage permissive -a tomcat_t


Comments

Leave a Reply

Your email address will not be published. Required fields are marked *