Before associate your mi account, please follow the steps below:
1. You have unlock permission with your Mi account.
2. Download FlyVPN via Google play store.
3. Choose Shanghai server, and press the power On button.
5. Associate your Mi account in Developer option.
6. Boot to Fastboot and flash Mi Unlock.
Tested on the device which hitting error 10008 when trying to associate the Mi account.
Hopefully it does help.