You can use the plugin http://ww.wp.xz.cn/extend/plugins/shortcode-generator/ to make a short code for your code.
This short code on execution will be replaced by the specified javascipt code .
the code can be placed anywhere you want even in posts or pages ..
when u want to use the shortcode in the php files just use this ->
<?php echo do_shortcode(‘[shortcode]’); ?>
Hope this was helpful
The wp-config.php file might have wrong entries in the database field.
Or the database on your host is currently unavailabe.. Check them…
you need to make a database and enter its name and password & db name in the wp-config.php file..
read the documentation properly