Clojure: binding vs. with-redefs

Clojure Vars can have thread-local bindings. binding uses these, while with-redefs actually alters the root binding (which is someting like the default value) of the var. Another difference is that binding only works for :dynamic vars while with-redefs works for all vars. Examples: user=> (def ^:dynamic *a* 1) #’user/*a* user=> (binding [*a* 2] *a*) 2 … Read more

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