How to check for already existing plugin versions on activation? and prevent errors

How to check for already existing plugin versions on activation? and prevent errors

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