You don't need to update to 1.8.0 first. You can directly attempt to install 1.8.6.
Follow these steps:
1. Edit this line and comment it, which means add 2 dashes at the beginning like so:
// qa_db_upgrade_query('ALTER TABLE ^userv...
2. Retry installation
3. If you get a similar error but referencing the following line, comment the next line
4. Retry installation
5. If you get a similar error but referencing the following line, comment the next line
6. Start a timer. Retry installation. Stop the timer immediately after the (successful or failed) execution of this line
7. Let me know if this fixed the issue and how much time the timer showed (I believe a long running query was the cause of the issue). You can remove the comments if things worked out well.