Getting the error "WARNING: MYSQL_OPT_RECONNECT is deprecated (...)" in my crons

I don’t understand why, but I simply cannot find nowhere online talking exactly about this error I’m having.

I’m using v7.12.8 and this warning started since yesterday (I guess there should have been some changes on my server that I don’t know).

Here’s the error message I’m getting each minute on my cron run: “WARNING: MYSQL_OPT_RECONNECT is deprecated and will be removed in a future version.”

I just want to get rid of this warning, that’s it.

Any suggestion on how I can achieve that?

In which log exactly are you getting that?

It’s just a deprecation warning, nothing wrong is happening, only in an upcoming version will it actually be a problem.

Each time my cron runs, I get this email with this warning. I mean, I can simply stop crons from sending me emails, but I would like to actually solve the problem and not “hide” the problem.

Getting errors via email is not standard behavior… You need to figure out which component of your system is doing that, to disable it

I wasn’t clear, sorry for that.

When the cron runs in my cpanel, the code that get’s executed in PHP generates an error. That error that happened during the cron job, is then sent by email.

So this means, I only receive the email because I get that error message when executing the PHP code in SuiteCRM.

My question is: is there a way to fix this and stop the error from happening?

I can’t find that error coming from SuiteCRM. It might be MySQL, or it might be some other process in your system.

But I don’t know how to fix it, if I can’t find where it’s coming from.

You might try exploring the actual logs, not the email, to find more information. If it’s an actual PHP error and you can get a stack trace of it, then you might understand the process.