Database users dont work

When a new user is added to a virtual server with a database access, the user/password doesnt work in mysql. This happens if the username format is set to user.domain in server templates.

I changed the username format to user@domain and it only works if we choose a username that makes username@domain less than 16 characters. in fact the username is truncated by mysql (for mysql < 5.7.8)

To fix this bug I think it's better to move the database user creation from Edit users to Edit databases page so that users can manage their database users there where virtualmin takes account of database username limitations




Howdy -- Jamie may need to comment on this, but just to make sure he has all the info you need -- can you verify your MySQL/MariaDB version?

To do that, what is the output of this command:

mysql -V

MySQL will always truncate usernames to 16 characters, regardless of whether the username format contains a dot or @.

On the Edit User page, it will also show the truncated MySQL username - make sure you enter that correctly when connecting to the DB.