By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,668 Members | 1,477 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,668 IT Pros & Developers. It's quick & easy.

how to restore MySQL database?

P: 1
I wanted to have another database on the hosting, clicked "Create database", entered a new password, and realized that the database was created on top of the previous one.

no backups. how to get everything back?
I didn't press anything else.

there are these buttons:

Create a database
To create an additional database
To remove an additional database
Database manager
Command line monitor

Please do not condemn, but to suggest how it is possible to get it back.
Thanks in advance.
Jul 6 '18 #1
Share this Question
Share on Google+
1 Reply

Expert Mod 5K+
P: 5,397
1) Contact your Host ASAP - they may do backups and might be able to assist you. I know that several hosts have such information in their "Self-Care" sections.

2) If you are using SSMS you might have a backup available depending on how you set things up - option to "Overwrite the existing database" and "Restore with Recovery" are selected

(this may be what your [Database manager] button is; however, you do not tell us who your host is so there's no way for us to know what this will do; however, from other hosts, this may be the location where you might find any back-ups and user privilege settings, etc...)

3) There may be some other steps to take, there are a few SQL queries that might be able to pull from your transaction logs; however, if these were overwritten when you created a new database on-top of your old database then I'm fairly certain that recovery is not possible.

I have this in my tool box - found it somewhere ages ago - it worked in my production environment, your mileage may vary:
Expand|Select|Wrap|Line Numbers
  1. select,recovery_model_desc,last_log_backup_lsn from sys.database_recovery_status r join sys.databases d on r.database_id=d.database_id
Looking to see if the recovery mode is "full" and that the last_log_backup_lsn isn't null. If either fail, then Recovery without some other source of data backup is, TTBOMK, not possible.

NB: A bit late; however, it bears repeating:
+ ALWAYS back-up your file(s) before making changes - have the back-up feature enabled.
+ ALWAYS make changes on a working copy NEVER on the production file(s)
+ NEVER overwrite the Production file(s) with the Working files before you have a back-up of the production file(s)
Jul 29 '18 #2

Post your reply

Sign in to post your reply or Sign up for a free account.