Custom permalink gives 404 error only in some pages

At the end it was because I wasn’t writing a product base. So, after writing a product base like /product/%parent_category%/%keyword% everything worked fine. Besides, I used a plugin called Woocommerce Permalink Manager to remove the “product” from the URL.

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