Error establishing a database connection

My website was working before with cloudflare as CDN and then this problem occur Error establishing a database connection after I transferred to cloudflare as my domain registrar. I did not change any settings in my site and I don’t understand why it had the error after I switch my domain registrar to cloudflare. I am using digital ocean with plesk. I need how should I resolve this and how did this happen please when the only changes was the registrar of domain. Thank you

That error shouldnt be related to transferring the domain alone.

That error typically occurs when you add your domain to Cloudflare (not in a registrar context) and when the database host you specified is a record which then is proxied.

Please use the search, as that topic has been discussed more than just once. In short, you need to make sure you are not connecting to a proxied address, in whichever way you achieve that.

I have added many WordPress website before in the cloudflare and non of this happen. Except this one is I transferred my domain to cloudflare. I have pause/disable the cloudflare on site. Only my DNS A record with IP value of my server is there.

Ehm, did you read what I wrote? I addressed that all.

Thank you for the patience guys. But after reading this


I finally had something to look at.

The error was cause by the SSL/TLS encryption mode . I turned it off because I already have SSL installed in my host then the next day I checked the site is up again.

Note: When you turn off the encryption mode the effect sometime it won’t happen immediately that is why I wait for the next day to propagate.
I will turn off the SSL from my host and use cloudflare.

Cheers,

I am not sure what you were just saying but it seems you mixed up a few unrelated things and on top made you site insecure now.

Do not remove SSL from your host

SSL has nothing to do with the database connection and the latter - as I already wrote - cannot be made via a proxied connection in the first place.

Make sure you connect to an IP address that is not Cloudflare related and definitely place the certificate back on your server.