function to set permalink to /%postname%/ on theme activation

You could, but I’d actually highly advise against that. In quite a few cases that will cause lots of 404 errors.

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