Will adding 40,000 301 redirects slow down a site?

It depends, if the plugin manually redirects each one of the links then it may slowdown. But, if is using regular expressions and then you end up with a few rules that handles all the redirection then it’s not a problem.

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