Database PostgreSQL and MarialDB

SYSTEM INFORMATION
OS type and version Debian Linux 12
Usermin version 2.302
Virtualmin version 7.30.8 Pro
Theme version 24.02
Apache version 2.4.62
Package updates All installed packages are up to date

OK this one is a bit too newbie - I have a new client who wants both MariaDB and PostgreSQL during development. :man_shrugging:

I have nodded :+1: (somewhat in ignorance)

All other VS on the box have only MariaDB. I have added PostgreSQL via webmin OK, but what now? :pensive_face:

You enabled it for the domain customers website?

Not sure about PostgreSQL, I usually use phpMyAdmin for MariaDB’s

Is there something like that available for PostgreSQL VM?

OR you should be able to refresh Modules and use the PostgreSQL Module?

EDIT: Found this forum post that might help?
PostgreSQL installed later

Set up a user for them?

Do you mean you installed the PostgreSQL packages?

If so, you can Re-check configuration and Virtualmin will see PostgreSQL is available, and you can then make it available in Features and Plugins and then enable it for the user that needs it in Edit Virtual Server->Enabled Features.

The PostgreSQL Webmin module is very similar to the MySQL/Mariadb module, and can also be made available to domain owner users (Can Manage Databases in Manage Virtual Server->Edit Owner Limits).

I would recommend letting Virtualmin handle it, unless/until you’re comfortable with managing PostgreSQL users and permissions.

PostgreSQL is fully supported in Virtualmin, very similar to MySQL/Mariadb. It has a full management module, Virtualmin can manage a user and permissions for the domain owner user, and can allow that user to manage their own databases (if permitted).

PostgreSQL is a first class database citizen in a Virtualmin system. It’s just much less popular than Mariadb, so we don’t install it by default. If you install it and tell Virtualmin to allow its use, it will behave just like Mariadb.

phpPgAdmin exists, but I seem to recall there’s some question about its maintenance. I don’t remember the state of things and whether we still ship an app installer for phpPgAdmin or maybe the newer version of it (I don’t use phpMyAdmin or phpPgAdmin, so I don’t track those projects very closely…I use the Webmin modules when I need a database GUI, though I’m just as likely to do everything on the command line).

Good to know. I will install PostgreSQL and check out the Webmin Module for it.
It will be nice to offer PostgreSQL to users of my VM Server

Oh, one other thing. If you haven’t already initialized PostgreSQL, you can automate that with:

virtualmin config-system -i PostgreSQL

This doesn’t actually do much, just does the same thing visiting the PostgreSQL module as root and clicking the button to initialize it or whatever would do, I think.

1 Like

It’s been awhile since I installed PostgreSQL. I really don’t remember doing anything, it just all showed up. But, that’s just from memory. I think Debian’s install sets it up and initializes it.

I was waiting to hear more from @Stegan since it seemed like an odd question from him.

Yeah, that’s likely. Debian/Ubuntu packages tend to do whatever dance is needed to start a service, while EL ships packages closer to upstream.

Yes :+1:

Done :+1:

still only MariaDB listed :-1:

Very odd (not a fan of or any experience with PostgreSQL) but needs must and it can’t really be that bad
I think a local machine install might help

In VM System Setting → Database Servers
PostgreSQL on the right click manage and make sure it is initialized

I’m on Rocky Linux (RHEL) so not sure if you have to do that on Debian but worth a try.

In VM System Setings → Features and Plugins make sure PostgreSQL database is check (if not check and save)

Also for the website you have to I believe enable PostgreSQL under Edit Virtual Server

Also System Settings check Allowed Capabilities, might have to enable “can manage databases” . I have many plans so had to do that for one website I was testing on.

I did above steps and now PostgreSQL is available for my websites and I just created a couple of test Databases and all worked great.

Just some suggestions to look at :grin:

1 Like

My recollection is Debian locks it down pretty tight by default. Like nuisance level lock down. Tools might help.

Use tools. :wink:

Browse to the PostgreSQL module in Webmin. See what it thinks about the situation. I’m guessing you’re missing some packages.

Don’t get ahead of the problem. We’re talking about getting PostgreSQL working with Virtualmin, which does not require third party tools and what Debian does is irrelevant. Virtualmin creates users with the necessary permissions to manage their own databases.

He specifically said he was considering using “a local machine” to explore it a bit. That’s what my recommendation specifically referenced.

1 Like

He should make a new topic for other problems/questions. :wink:

Y’all shouldn’t confuse me with quicksand topic changes. My brain doesn’t work that way.

@CTS thanks, that helped, now up and running i think

@ID10T by “local” I mean Windows :sad_but_relieved_face: I do not have a local Linux machine - it loaded OK and a test database appeared to work. So more learning! I am getting too old for this :baby_symbol:

1 Like

Old dogs can learn new trix. We just don’t wanna. :wink:

1 Like