Solved

MySQL Datafiles On CentOS 7

Posted on 2016-10-03
5
17 Views
Last Modified: 2016-11-10
Hello guys,
For data restore reasons i wanna know exact data files location and there filename extention.

Which files are then sufficient to restore a mysql database on onother Linux Machine?

Please Help
0
Comment
Question by:mos1234
  • 3
5 Comments
 
LVL 61

Expert Comment

by:gheist
Comment Utility
/var/lib/mysql/*
There are multiple files in there.
File backup is only valid if mysqld is completely stopped.
Normally you would want to pipe mysqldump output to backup system pipe.
0
 

Author Comment

by:mos1234
Comment Utility
does it mean that if MySQL is running and the hardware crashes theres no chance for recovery from files retrieved someway from the storage?.....
0
 
LVL 61

Assisted Solution

by:gheist
gheist earned 250 total points (awarded by participants)
Comment Utility
You can make transaction-accurate replica and make backups with or without shutdown from that.
Bonus - it can be used as read-only database too.

Why - you make mysqldump backups. Image backups will not work with any open database.
0
 
LVL 24

Accepted Solution

by:
Tomas Helgi Johannsson earned 250 total points (awarded by participants)
Comment Utility
Hi!

All data that has been commit-ed to disk would be recoverable if the files are accessible and not corrupted after you reboot and/or mount the disk where the database is located.
You would need to recover all /var/lib/mysql/ directory to a new location and start mysql on that location. If you get a successfull startup then you could do mysqldump (backup) of the data to be restored on a "clean" and fully functional server.
What I recommend is that you have a master-slave / replication setup for disaster recovery as well as backups to minimize recovery time on your database especially on mission critical databases.

Regards,
     Tomas Helgi
0
 
LVL 61

Expert Comment

by:gheist
Comment Utility
Thats life
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

This guide whil teach how to setup live replication (database mirroring) on 2 servers for backup or other purposes. In our example situation we have this network schema (see atachment). We need to replicate EVERY executed SQL query on server 1 to…
Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now