Solved Duplicated username when creating Database from Directadmin

MaXi32

Verified User
Joined
Jul 25, 2016
Messages
658
Location
The Earth
Hai, I created a new database called maxi00_maridb and with the username maxi00_mariusr


When I log into phpMyAdmin, I notice that DA actually created 2 usernames one with underscore and one without it but both are using the same password (I can log both with the same password):

1613402113442.png


The same thing happen with pre-release version.


Step to reproduce this:

1) Create a normal username from reseller
2) Login as this user, then create a new sql database:

3)

Give database name as maxi00_maridb
Give database user as maxi00_mariusr

4) Now you will get 2 users name one with maxi00_mariusr and another one as maxi00 both having the same password.

Is this something new ? what is the reason having 2 usernames?
 
Last edited:
Seems like I have seen this before. Are there actually 2 db and 2 users in Mysql? or you just see dups in the forntend
 
Seems like I have seen this before. Are there actually 2 db and 2 users in Mysql? or you just see dups in the forntend

No the 2 duplicated users are pointing to the same database. when a database created, it automatically created both users. For example, if I create a new Directadmin user called abc99. Log as this abc99, Then I create a database called mydb (I do this all in DA)

database name: abc99_mydb
database user: [same name as above]
database password: 12321x21890uidsaiy1980

then I click create database -> open phpMyAdmin, I saw first user with abc99 created in PMA and another one with this underscore name called abc99_mydb. So why there are 2 users here.

But, I can actually login using this user abc99 and abc999_mydb because they are sharing the same password.
 
I understand what you are saying, and it looks like a bug, but I can't reproduce it. Tried in Evo and Enhanced skin.
Do you have a customized skin or other customizations?
Or maybe newer version phpmyadmin? I don't see the user in phpmyadmin.
 
@Richard G I use Evolution Skin. No customization. Tried both pre-release and stable having the same problem.

I might thinking that the username might be created by DA perhaps to be able to use one click login to PhpMyAdmin? But this is just my early assumption.

I will reinstall and let see if the error is gone. Last time what I did is upgraded to pre-release version just to test API.
 
this is the resellers Admin user for all dbs? Just like da_admin?

if you go to that user and create a second db like def98 what happens

This is the user created with the database.

abc99 is a new test user. Meaning I use Reseller account like myreseller99 to create this user. abc99 is a normal user account with unlimited packages created by reseller.

So if I created a new database using the same username, it didn't create any other duplicated users. Meaning it only create that duplicated user first time.
 
I see some SSO name when logged in via SSH. I just wonder how you get those usernames visible in phpyadmin. If I login via SSO I only see the database created and information_schema, no users like you have them on a row.

Maybe if you can tell me how you got that shown, I can have another look for you if I can reproduce the issue.

Meaning it only create that duplicated user first time.
Maybe a hickup? The test I did on evo skin was also the first time I created a database user for that account.
 
2 ways:

1) From the terminal. Run mysql then type this:

SELECT DISTINCT User FROM mysql.user;

2) Or in Phpmyadmin -> Home -> User accounts

1613409803939.png
 
You have another version of phpmyadmin. I don't have a tab user accounts in my phpmyadmin.

  • Version information: 5.0.4 (up to date)
I'm using that version. Maybe they have changed the interface for old version it's hidden somewhere. This is the latest version build from custombuild.
 
I'm using version 4.9.7 which is the latest 4.9.x version build from Custombuild 2.0. So it seems the 4.9.x version does not have that table or hidden indeed. Then you have phpmyadmin=5 in options.conf.

However, I don't think the version is causing this odd issue. Lots of people using v5 and it's the first time I'm seeing an issue like this.
Still can't reproduce it.

Do mysql logs show anything odd?
 
@Richard G

The mysql log doesn't have any error logs

I just installed a fresh Directadmin using auto install and I can still reproduce this (uploaded this video on youtube unlisted link below)

I just login DA using admin account->create reseller package -> create a reseller account -> then create a user package -> create user account

Now using that user account user1, I log in -> I created a sample database called user1_db with username user1_user, it automatically added 2 usernames there one with user1 and another one with user1_user.

Video:


So it happens on a fresh DA installation. No custom options.conf or directadmin.conf. Install directly using this method:

bash <(curl -Ss https://www.directadmin.com/setup.sh) auto

Also the latest version for phpMyAdmin is 5.4.0. When installing directadmin, it actually auto use this mirror link: downloadserver=files-sg.directadmin.com

I think this mirror contains the latest phpMyAdmin 5.4.0. So maybe someone can try if this is reproducible from this mirror.
 
Last edited:
Forget to let you know that, I received an answer from a ticket that this is not a bug .. maybe a hidden feature that DA will use it for its own purpose (not sure what purpose). I had my license support expired and wouldn't dare to ask this technical question deeply in the ticket (will renew soon). :D Thank you guys for helping me here.
 
Oke still odd that this only happens on the very first database created.
Anyawy, thank you for reporting back, so we know this for the future.
 
Back
Top