Change a customizer control based on another control’s value dynamically

In the end, I ended up using Javascript. Solution involved changing the values of second dropdown depending on the value of the first dropdown. The data (an associative array with keys being options for the first dropdown and their corresponding values being options for the second dropdown) is localized using wp_localize_script and made available in javascript.

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