ajax working when function is on child theme but not in plugin page

And i found the answer. As Jacob Peattie asked the instance of the class was defined but was not called. Although the class file was included , instance was not called. Thank you everyone for your valuable time.

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