How to change the link address from internal to external

Just replace plugins_url('script.js', __FILE__) with 'https://site2.com/script.js'.

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