Before Solomon was anointed king, his father said to him, "As for you, my son Solomon, know the God of your father, and serve Him with a loyal heart and with a willing mind; for the LORD searches all hearts and understands all the intent of the thoughts. If you seek Him, He will be found by you; but if you forsake Him, He will cast you off forever" (1 Chronicles 28:9).
David was saying, "Son, listen to me. I know a thing or two about life. I've made my mistakes, but I also followed the Lord and served Him. You need to serve the Lord with an undivided heart. You can't live off my faith, son. You need your own faith."
Initially Solomon followed David's advice. His heart wasn't divided at first. But then he started opening himself up to things that he had no business being a part of. Things went from bad to worse. He went on a little research project to see what was out there. Solomon did everything and tried everything. In the end, here was his conclusion: "Fear God and keep His commandments, for this is man's all" (Ecclesiastes 12:13).
The word for fear
that Solomon used also could be translated "reverence," "respect," or "awe." God is the Creator of the universe. He is holy and righteous. To fear Him means to have reverence for Him. It's a healthy respect. Solomon was saying, "Have reverence for God. Keep His commandments."
God's commandments are like guardrails on the road of life, which keep us from getting ourselves into trouble. When Solomon said, "This is man's all," he was saying, "This is what will make a whole man." If you want to be a whole man or a whole woman, then you need to fear God.