Solved

Linux MySQL

Posted on 2012-03-12
2
416 Views
Last Modified: 2012-03-25
How can I make a copy of all of the databases in a MySQL  server and move them to another server?  I believe they all have different logins so looking for an easy process.
0
Comment
Question by:Jack_son_
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 21

Assisted Solution

by:K V
K V earned 250 total points
ID: 37713416
- if you have root access you can do mysql dump.
- if you have filesystem access you may stop mysql / flush tables with read lock and then copy data files.
- dump each of the db one by one!! may be a shellscript will do the job! You may directly redirect it to target db if it's accesible:
mysqldump -uUSER -pPASS --databases DB1 | mysql -uUSER -pPASS -hREMOTEHOST/IP
0
 
LVL 25

Accepted Solution

by:
Tomas Helgi Johannsson earned 250 total points
ID: 37713866
Hi!

The easiest way is to use mysqldump as theGhost_k8 says.
To dump all the databases you issue
mysqldump -uUSER -pPASS --all-databases > dumpfile.sql
and then issue
mysql -uUSER -pPASS < dumpfile.sql

http://dev.mysql.com/doc/refman/5.5/en/mysqldump.html

Hope this helps.

Regards,
     Tomas Helgi
0

Featured Post

Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It’s 2016. Password authentication should be dead — or at least close to dying. But, unfortunately, it has not traversed Quagga stage yet. Using password authentication is like laundering hotel guest linens with a washboard — it’s Passé.
This post contains step-by-step instructions for setting up alerting in Percona Monitoring and Management (PMM) using Grafana.
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
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.

626 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