Can't connect to database

select * from g4_domain where userid = TRIM('dwkjdbqjwe') and Stype='2'

1045 : Access denied for user 'root'@'localhost' (using password: NO)

error file : /index.php