Database Username name change not taking effect

There seems to be some bug in the most current version. Changing the username on a database results in no change.

Tested multiple times. Steps taken:

1.) log into hestia cp and navigate to URL: list/db/
2.) click on pencil (edit) icon on the database I wish to change username
3.) change value in the username field and hit save button in top right corner. The page refreshes with new green text under the Edit Database header, which states “Changes have been saved”. The new username I entered, appears in the username field, and the value to the right of the field shows that username.
4.) Then go back to URL: list/db/ (main database page) and then I see the original username still listed in the username column. If I click on edit (pencil) icon it will reload the edit page and the old username is listed again.

I have rebooted server, rebooted mariadb, same result. Tested multiple times. I can’t seem to find a solution. I don’t have time to troubleshoot, so I will export the database and create a new db with the username I want and reload. But this appears to be broken. Just wanted to inform the team here in case it isn’t known.

I usualy never rename a database user, so I cant say much to the function itself. But what’s exactly failing when you create a new db and user? Can you add the db/user? Can you import the db?

Hi @Raphael, yeah, neither do I. This is just a one off when I realized I had a typo in the name. So I wanted to rename it. There appears to be the ability to change the username in the edit page of the database, so I would expect if there is a editable field and it shows changes are saved, I would think it has the ability to change the username.

However, it does not actually take the change, it’s as if it’s doing nothing. That’s why I wanted to raise it. I assume it SHOULD change the username.

If you follow my steps above on an existing database you have, you should see the same results. So if the expected behavior is that the username should be changed after you submit (save) the edit page, then there definitely appears to be a bug.

We do run a test:

@test "MYSQL: Change database user" {
    run v-change-database-user $user $database database
    assert_success
    refute_output 
    validate_database mysql $database $database 123456
}

And it is working fine

There is a bug in the UI

If you do it through the Hestia CP interface as I describe above, does it work for you?

I tested with one of my databases as described and it would not actually make the change. Not sure why, but that’s what I saw on my end. And I have not done anything custom to MariaDB or anything, so I would expect it to work.

As I mentioned, I just decided to do a dump of the database and then I deleted the database and recreated with the username I wanted and reimported the SQLdump file. So I now have the database and database username I wanted, so I’m all good. But I just posted this to share that someone is not working right in the Hestia interface. Just thought to share in case others are experiencing the same issue.

Ah okay, so there is a bug and you guys are aware of it. Cool. I guess it will be fixed in a future release. Sounds good. As I mentioned, I have worked around the issue by deleting database and recreating with new user. Good to know that it’s been identified, so that it can be fixed in future.

Please create an issue at Github