Error establishing a database connection pls help

SYSTEM INFORMATION
OS type and version Ubuntu 22.04
Virtualmin version 7.7.GPL -3
Hi all!
I installed Virtualmin, after that I created a Virtual Server several times, when I try to view each Site I made shows an error message that says “Error establishing a database connection”.
I use MariaDB and all the configurations are okey. And I have re-installed MariaDB several times with no changes.

Thank you in advance!

You should not have to do that.
Did you use a clean OS and use the Automatic install script?
https://www.virtualmin.com/documentation/installation/automated/

Yes! And at first it worked and it showed the website but it would take the index.html from another website and all of the virtual servers would have the same index.htm. So we erased the virtual server from which the others were taking the index.html and now it just show “Error establishing a database connection”

would this be the same error

Thanks for your answer.
It’s not the same error. I haven’t installed the Wordpress script because we don’t need it for what we are trying to do.
So we don’t get why there is a database error when MariaDB it’s accessible and working perfectly (but it doesn’t have any tables).

So what are you using to connect to the database? Where are you seeing this error. You should only see that error if your using a website that is you a php connection to a database. A plain html page doesn’t need a database.

We have not installed any other program only Virtualmin but when we click " Preview website" button in Virtualmin Service Menu the error pops up. We have even modified the file(index.html) to be just our name and its still triggers the database error. We don’t understand why it’s calling a database.

Don’t use preview website, just go to the website direct. I have had errors using preview.
Click the domain name here.

preview sends to a huge url
ie https://www.serverdomain.com:10000/virtual-server/link.cgi/xxx.xxx.xxx.xxx/http://www.virtserver.cf/

rather then https://www.virtserver.cf/

I just typed the https://vserver.com/index.html and it worked instead of just typing the https://vserver.com.

Thank you so much for your help.

really, that shouldn’t matter, what about https://vserver.com/
index.html and index.htm shouldn’t needed to be typed.
what do you see when you use https://vserver.com
default index file are normally
image

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.