This article describes how to troubleshoot SharePoint 2013 plus content database after a 404 error occurs.
The author follows the manual steps of http://technet.microsoft.com/en-us/library/ff628582 (v=office.15). aspx to remove the old content database and attach the content database at the Central Administration site.
However, there is a 404 error accessing the site.
Later http://social.technet.microsoft.com/Forums/sharepoint/en-US/7c12f552-0ecf-4276-a385-cba6afcc3370/ The Sharepoint-2010-database-attach-404-error forum has one of the same questions, according to the tips of this article
So I decided to use the PS command line to re-uninstall and attach the content database
Dismount-spcontentdatabase "<ContentdBName>"
Mount-spcontentdatabase "<ContentDb>"-databaseserver "<DbServer>"-webapplication http://SiteName
Then the site is really back to normal.
I would like to say that the PS command is still better than the Management Center interface operation.