wp search-replace inside site’s directory bring PHP fatal error

The source of the problem was unchanged (or shall I say, “adjusted”) wp-config.php file in the site’s directory.

The DB-name and DB-username there where both outdated. I changed them to the new ones and than I ran the command successfully.

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