Permalinks keep reverting to 404 unless I re-save them

Same problem for the last few weeks, using nginx not apache,
Switching rule saving, then switching rule back and saving fixes it for a day…

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