Proper way of minifiying java script files in wordpress theme

Ad1. Just after make minification, do some tests with development tools (F12 in FF) There is a console where you will see all errors, warning etc. If something went wrong, you’ll see it

https://developer.mozilla.org/en-US/docs/Tools/Web_Console/Opening_the_Web_Console


Ad2. Hard to say because every case is different but sometimes it’s matter.
Which plugin do you use for that? For example in W3 Total Cache you have an option which let you make order of your scripts for minification

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