Solved

Linux MySQL

Posted on 2012-03-12
2
410 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_
2 Comments
 
LVL 21

Assisted Solution

by:theGhost_k8
theGhost_k8 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 24

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

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Both Easy and Powerful How easy is PHP? http://lmgtfy.com?q=how+easy+is+php (http://lmgtfy.com?q=how+easy+is+php)  Very easy.  It has been described as "a programming language even my grandmother can use." How powerful is PHP?  http://en.wikiped…
SSH (Secure Shell) - Tips and Tricks As you all know SSH(Secure Shell) is a network protocol, which we use to access/transfer files securely between two networked devices. SSH was actually designed as a replacement for insecure protocols that sen…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
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.

705 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

18 Experts available now in Live!

Get 1:1 Help Now