?
Solved

MYSQL Code Question

Posted on 2011-10-25
5
Medium Priority
?
364 Views
Last Modified: 2012-06-21
I have the following dump code in a batch file that dumps mydatabase to a network share...

@echo off
"C:\wamp\bin\mysql\mysql5.1.53\bin\mysqldump" --databases mydb --add-drop-database -uroot -pmypassword >"\\158.25.36.15\d$\users\user43\file3\Backups\databasebackup.sql"

My question is, can someone provide the MYSQL code that will import the same data FROM the same location in this code. Or in other words, I just need the MYSQL code to restore a .sql dump. Thanks


0
Comment
Question by:wantabe2
4 Comments
 
LVL 2

Accepted Solution

by:
DataCruncher earned 2000 total points
ID: 37027714
The following should restore your database in MySQL:

mysql.exe --verbose -uroot -pmypassword mydb <"\\158.25.36.15\d$\users\user43\file3\Backups\databasebackup.sql"

Open in new window

0
 
LVL 75

Expert Comment

by:Anthony Perkins
ID: 37028639
>>Zones: MySQL Server, MS SQL Server, SQL Server 2008<<
Is this question related to MS SQL Server?
0
 
LVL 13

Expert Comment

by:p_nuts
ID: 37028646
Why not just copy the db files out. To restore just stop services and put the files back and start the service.
0
 
LVL 15

Author Closing Comment

by:wantabe2
ID: 37030400
Thanks for your help on this!
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

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

Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
The title says it all. Writing any type of PHP Application or API code that provides high throughput, while under a heavy load, seems to be an arcane art form (Black Magic). This article aims to provide some general guidelines for producing this typ…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses
Course of the Month13 days, 11 hours left to enroll

755 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