Depends on what kind of business you're running. If you are serious and trying to build your brand and contacts then you should tell your client you messed up and fix it. This way your conscience remain clear and you probably won't loose a client nor get into legal trouble. But if your client finds out that you kept something from him you will definitely loose him and it will harm your biz.
I have a few regular clients and sure I have made some mistakes when doing stuff for them, but but I was never hiding from it, one time I even messed up so bad the client almost lost a domain and his website was down for a day....horrible. I apologized and offered some work for free as a compensation, the guy said don't let it happen again and we continue working together.