These forums are locked and archived, but all topics have been migrated to the new forum. You can search for this topic on the new forum: Search for How change MySQL Administration username? [Solved] on the new forum.
I created a virtual server verylongnamewebsite for domain verylongnamewebsite.com. Users were created accordingly: Administration username: verylongnamewebsite (For MySQL database : verylongnamewebs
As you see MySQL user was truncated to "verylongnamewebs".
I manually fixed the name & corresponding user/db rights in MySQL server. Everything is good except when I go edit virtual servers page it still shows as verylongnamewebs.
I manually changed the name in
vi /etc/webmin/mysql/sportmedosteorapid.acl
But it still points to verylongnamewebs
Is there a way to tell virtualmin that MYSQL Administration username is now different.?
Thanks.
There is a way. Go to Webmin -> MuSQL Database Server. In the upper left, you will see a link for Module Config, click it. The very first entry under Configurable options is the Administration login, and below that is the password.
I wouldn't recommend changing the webmin files themselves.
Its not it. I need to change a default user name (not password) for virtualmin virtual site, By default it's being created with the same user name as the virtual host itself. The name of my virtual host is too long, so it's being truncated. You can see the default name by going to Virtualmin->Edit virtual server->Virtual server details section.
Sorry, I read your message wrong, I thought you asked about the default MySQL administrator, typically root.
You can certainly create a new user and assign them database privileges via the Webmin MySQL module. Your question I read was specific to MySQL. I see you have earlier questions, so, not sure now what you are asking.
As far as changing admin usernames (not just MySQL), I don't think there is a way from the GUI. There probably is from editing files, but, you have to find the right ones. Even then, it may go awry on a restore, etc.
If you really wanted to JUST change the MySQL username for some virtual server, you can do that from the command line via virtualmin modify-database-user command. Is that what you want?
Or, did you really want to change the admin name in total? If so, never used it, but. virtualmin modify-server --user may do what you want.
Type virtualmin modify-domain to see the options from the command line. I wish there WAS a gui way, maybe there is, if so, hopefully someone will point it out.
Here we go. When creating virtual host longnamevirtialhost.com virtualmin creates everything (folders, files, mysql db, mysql user, etc) using the name of the virtual host (in our case longnamevirtialhost.com). I.e. Domain name: verylongnamewebsite.com Administration username: verylongnamewebsite Administration group: verylongnamewebsite Home directory: /home/verylongnamewebsite MySQL DB: verylongnamewebsite and MYSQL admin user: verylongnamewebs <- truncated
I went ahead and manually "fixed" the MYSQL admin user to "shortnameweb", and give this user rights to MYSQL DB verylongnamewebsite. Copied php files to verylongnamewebsite, and my web site is up and running = no errors.
Virtualmin web gui still lists MYSQL admin user as verylongnamewebs When go Virtualmin->Validate Virtual Server -> Validate Now It gives an error MySQL database : MySQL login verylongnamewebs does not exist
I run virtualmin modify-database-user --domain verylongnamewebs --type mysql --user shortnameweb as you suggested and it changed the name accordingly.
Thanks.