Disable STRICT_TRANS_TABLES

I need to disable STRICT_TRANS_TABLES
I googled how to to it and found that tutorial

SSH ask for password and I don’t know root mySQL password
i changed it from phpmyadmin and another time without password and that did the required to disable STRICT_TRANS_TABLES

The problem when change root mysql password i get error in website say that cannot connect with root@localhost with password

how to disable STRICT_TRANS_TABLES without change root mySQL password