It should not be possible to connect to the production database from your local machine, especially if the tool you are using to write and run your code is configured by polite entreaties that can be ignored willy nilly.
I mean, yes, our team and I were too lazy to set up things correctly cause we were hurried to ship some AI product only to be replaced later by OpenAI's much better version.