Wordpress site preview works but get database error when using the URL

New sandbox install. The site previews fine but when I go direct I get
“Error establishing a database connection”. Can login to the database using phpMyAdmin so I know the credentials are correct in wp-config. Has the litespeed-cache plugin installed.


Must have been a caching issue as it works fine this morning.

If happens again try to clear cache and see if problem go away.