You need to find the persistence.xml which is erasing the database.. that's hibernate configuration.
If you are in linux grep all the files to find all the persistence.xml files around and make sure that all of them are pointing to your mysql.
You should also take a look at the AS configuration files which can be defining a Data Source which can also be causing that behavior.
Cheers