Solved

how do I restore mysql --all-databases dump?

Posted on 2015-01-24
5
165 Views
Last Modified: 2015-02-13
On a centos linux server, I'm moving from one server to another.

I dumped my current database using this:

# mysqldump -u root -ptmppassword --all-databases > /tmp/all-database.sql

then moved the database.sql file over.

Now, how do I restore all databases?  There is some content in the current databases of the same name that I would like overwritten,

Chris
0
Comment
Question by:St_Aug_Beach_Bum
[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
5 Comments
 
LVL 29

Expert Comment

by:chilternPC
ID: 40568578
I would have use phpmyadmin to back up the tables in the database and then use to it to restore the tables to a different  MySQL

http://www.phpmyadmin.net/home_page/index.php
0
 

Author Comment

by:St_Aug_Beach_Bum
ID: 40568593
Yeh, I would have liked to do that too, unfortunately I'm dealing with a server that got hacked and is in recovery mode, I can ssh in and do a limited number of things, but no phpmyadmin :)
0
 
LVL 62

Expert Comment

by:gheist
ID: 40568600
sl scripts can e fed to mysql client command line

mysql < backup.sql
0
 
LVL 78

Accepted Solution

by:
arnold earned 500 total points
ID: 40568601
note this will overwrite all including the mysql security/db/.
the file has the data in clear text readable directions.
on the new system.
mysql  -u root -p < all-database.sql
0
 
LVL 62

Expert Comment

by:gheist
ID: 40568613
In theory you need to run mysql_upgrade after - it knows how to update system DBs for last few mayor versions.
Should it fail you must go database by database.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

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…
Google Drive is extremely cheap offsite storage, and it's even possible to get extra storage for free for two years.  You can use the free account 15GB, and if you have an Android device..when you install Google Drive for the first time it will give…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

752 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