Ecclesiastes 8:2

Amplified Bible (AMP)
I counsel you to keep the command of the king because of the oath before God [by which you swore loyalty to him].

Read Ecclesiastes 8:2 in other translations