MSSQL read only account causing 18456 errors

I have a MSSQL database connection set up with a read only account. The connection is valid but when I check event viewer on the SQL server it is showing several 18456 events. Looking into it further, it is because it is trying to access the Master of which for security reasons the account isn’t configured. When I set up connections locally on a trial test gateway I didn’t receive the errors. Things I’ve done, disabled it as a tag history provider. I have it set up as jdbc:sqlserver://ipaddress and in the extra connection properties: databaseName=Database everything else is default and it results in a valid connection, I can even use the DB browser in a designer.