How to stop google from indexing spammed internal search results?

How to stop google from indexing spammed internal search results?

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