开发者

access mySql database on file basis

开发者 https://www.devze.com 2023-02-06 09:35 出处:网络
Okay, heres a easy one for all you mysql folks out there: Our Win 2003 server crashed last night (durring installing of windows updates). We were able to restore old data from backup, but we miss 22

Okay, heres a easy one for all you mysql folks out there:

Our Win 2003 server crashed last night (durring installing of windows updates). We were able to restore old data from backup, but we miss 22 hours of data. We cannot start windows and therefore not access the data through mySql admin which is the program I use normally to make backup. We have however been able to copy all data to external harddisk.

How do I access these data usning MySql Query browser and MySql Administrator tool开发者_StackOverflow?


  1. If you don't have binlogs enabled, or cannot be sure at which point your backup snapshot was made trying to get the datadir running in another server is about your only option. (Which for maximum possibility of recovery should be as much like the original as possible in MySQL version and other environmental data).
  2. If you do have active binlogs, look at this manual


Please let me preface this by saying, I'm not a Windows administrator, so permissions issues are outside my expertise.

  1. Setup a new machine running the same version of MySQL.
  2. Create a new folder and copy your backup of mysql data to that folder, including the mysql database.
  3. Edit your my.cnf file on the new machine to change the following:

# set your data directory

datadir = c:\path\to\new\datadir

# just in case

skip-slave-start

# optional

skip-networking

# if this is an emergency and you need to go through password recovery

skip-grant-tables

Restart MySQL and watch your error log for output. It should start up and you can simply sign in as 'root' with no password and do what you need to do to backup your data.

0

精彩评论

暂无评论...
验证码 换一张
取 消