How can I fix the Insert/Edit link button in the Visual Editor in WordPress 3.9.1

I had the same problem. I solved it by creating the link in a Word Processor document (Pages in my case) and then copy and paste into WordPress.
I had to edit the HTML text to open the webpage up in a separate window.

All working correctly now.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)