Socrates said this quote

By all means, marry. If you get a good wife, you'll become happy; if you get a bad one, you'll become a philosopher.