Restoring domain: re-creating MySQL user fails when too long

Damn, this time the problem si more serious, and related to the issue of having the domain_user username schema. When restoring a domain which is 16 chars long or longer, restoring fails when recreating mail/ftp users with following error:

Restore failed : SQL insert into user (host, user, password) values ('localhost', 'xxxxxxxxxxxxxxxx', '*582428D033C749415C81C7AA61ABF8529FB710EA') failed : Duplicate entry 'localhost-xxxxxxxxxxxxxxxx' for key 1

that's a pain in the ass now... i must restore longer domains separately without the mysql option, re-enable mysql login manually and import databases manually... i don't know why that query fails in the first place, there are not similar users in mysql... odd...

Status: 
Closed (fixed)

Comments

Looks like this is related to your other issue with MySQL username clashes. I have implemented a fix for both of these, and it will be included in the next Virtualmin release (3.82).

If you like, I can send you a fixed version right now. I presume you want a .deb file, as you are running on Debian?

yeah, this was caused by my stupidity... i thought i set the mysql password sync option to off, but i did that only on the old server, not on the new one. so basically the same issue arised.

unfortunatelly when i realized that it was already too late, as i already imported the problematic domains without the mysql databases and switched ip in the dns zones... so i had to manually add each database, load the dump and import it to the virtualmin user. oh well, that was a long night, but things are working now.

however i could test the deb package (x64) on the old server and eventually deploy it to the new one as well...

I've just emailed you an update to fix this..

It really is a Virtualmin bug - no matter what options you select, it shouldn't be detecting some user has having a MySQL login enabled when they really don't.

Automatically closed -- issue fixed for 2 weeks with no activity.