Virtualmin + MariaDB issue

SYSTEM INFORMATION
OS type and version Ubuntu Linux 24.04.2
Virtualmin version 7.20.2
Theme version 23.03
Apache version 2.4.58
Package updates 5 package updates are available

mariadb --version

mariadb Ver 15.1 Distrib 10.11.8-MariaDB, for debian-linux-gnu (x86_64) using EditLine wrapper

When I create new domain, everything works fine except mariadb.
When I try to login to mariadb user with correct credentials then also getting below error:

mysql -u test1 -p

Enter password:
ERROR 1045 (28000): Access denied for user ‘test1’@‘localhost’ (using password: YES)

As of now, workaround is that, I login on phpmyadmin using root and changing password after selecting user as showing in below image ( and yes I am using same password which I used while creating virtualmin domain) and works fine.

I am still not getting exact issue if someone here can enlighten something on my issue.

If you installed virtualmin on a clean OS (no preinstalled installing of any software).
When you created the virtual server did you enable Maria Database for that domain.

Install phpmyadmin via Manage Web apps and it should just work.

  1. It is fresh installed OS and during setup
  2. When I create virtual server, I click on MariaDB option
  3. I didn’t get Manage Web Apps on webmine if it is part of webmine.

Did you mean: webmin
if it’s not part of webmin, it’s part of virtualmin. Have you just installed webmin & not virtualmin ?

Sorry typo, it is webmin
I have installed virtualmin and creating domain through it. But this will install phpmyadmin for a particular domain right? or will be global ?

Ok as you use ubuntu you can install phpmyadmin globally using

apt install phpmyadmin

and each anydomain/phpmyadmin url will work, with one perhaps pitfall which is if you use multiple versions of php and a domain has a different version of php running than the distro default it may not work. Or you can use the virtualmin installer for phpmyadmin on a single domain and just tell all phpmyadmin users to use the selected url e.g selecteddomain.tld or selecteddomain.tld/somepath depending on how you use the virtualmin installer which gets around the php mismatch issue. Note any mysql user will be able to log in from this url not just the user(s) from the selected domain

I have install phpmyadmin using apt-get install only. at first I checked with manual setup with different version but that didn’t help.
and I don’t think so it is related to phpmyadmin.

Issue is different, when I create domain using virtualmin, it is creating DB, which I am not able to authenticate using either phpmyadmin or cli.

Anyone would like to share their thoughts on this issue ?

I think @jimr1 summed it up there are potential pitfalls loading phpmyadmin as a global package rather than using the Web app (`per domain’ approach) - I am assuming that you have ore than one domain on the VS. and multipl versions of PHP is only going to make life even more complicated.

Ok but what exactly I am facing is not related to PHPMyadmin, while creating domain on virtualmin, it is creating domain along with database and it’s credentials with the status “OK” and when I try to login with that credentials using terminal " mysql -u username -p " seems not allowing me to login.

Let’s be clear “Manage Web Apps” is under Virtualmin

in the tab above that you can “Edit Databases” to see the username and password “credentials” - they are of course MariaDb credentials.

No, you should not do that on a Virtualmin system. It will cause breakage of Virtualmin-managed virtual hosts.

Don’t do that.

Uninstall phpmyadmin and use Manage Web Apps to install it for each domain you want to have PHPMyAdmin. If you want a central one for all domains, you can do that, instead, but don’t do it with the Ubuntu package, as it is not suitable for use in a virtual hosting environment.

1 Like

is it version specific issue, I have another server with

SYSTEM INFORMATION
OS type and version Ubuntu Linux 22.04.1
Webmin version 1.999
Virtualmin version 7.0
Theme version 19.99
where it works very well.

It seems you have an outdated Virtualmin repository. Set up a new repository using the following command and then install the latest package updates:

sudo sh -c "$(curl -fsSL https://software.virtualmin.com/gpl/scripts/virtualmin-install.sh)" -- --setup

Please always make sure you test with a current version of Virtualmin and Webmin before asking questions. It takes up a lot of time talking past one another when you’re possibly talking about issues that are no longer present or not seeing the same terminology everyone else is using because you have an old version of the UI.

https://forum.virtualmin.com/guidelines

1 Like

Thanks for reply, currently I have latest repo only, I have posted older repo detail where it is working expected.

@Joe Thanks for reply, I have installed current version only, I have posted previous version detail just to let you know that it is working on that version as expected.

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