How to correctly move jquery script to external file

Use an absolute URL – you say the script is in the root directory, is that the root directory of WordPress? If so;

<?php wp_enqueue_script( 'sscroll', site_url( "https://wordpress.stackexchange.com/questions/12306/sscroll.js" ), array( 'jquery' ) ); ?>

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