Solved

myd export from server

Posted on 2009-04-06
11
454 Views
Last Modified: 2012-05-06
Can anyone tell me how to get the .myd,.frm,.myi file from the server.Also tell me how to restore that files to the new database.
0
Comment
Question by:coolguy2009
[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
  • 6
  • 4
11 Comments
 
LVL 5

Expert Comment

by:ModarHijazi
ID: 24075877
The easiest way is:
1) Stop the MySQL Service.
You can do it from the console:
net stop mysql

2) Copy the data folder (replace DATABASE with your database name)
%programfiles%\MySQL\MySQL Server 5.0\data\DATABASE

3) Put it in the new server

4) Restart the service
net start mysql
0
 
LVL 5

Expert Comment

by:ModarHijazi
ID: 24075883
And of course you can use the export/import features in "MySQL Administrator" in  the GUI package:
downloadable from:
http://dev.mysql.com/downloads/gui-tools/5.0.html

0
 

Author Comment

by:coolguy2009
ID: 24076117
Hi,

I only have the access to the server.How to do it.

Please tell me....It is a unix box.

Thanks
0
Technology Partners: 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!

 
LVL 5

Expert Comment

by:ModarHijazi
ID: 24076174
It's much easier u can use the internal dumb

http://www.unixnewbie.org/how-to-backup-and-restore-mysql-database/

To dump the database onto a text file: mysqldump database_name > database_name.sql

To import the data into a database: mysql database_name < database_name.sql

Replace database_name with the name of your database.
0
 
LVL 5

Expert Comment

by:ModarHijazi
ID: 24076528
BTW, just to be clear the 2nd method works even on Windows, but when the database is very huge, i usually use the manual method (1st method) for performance issues only.
0
 

Author Comment

by:coolguy2009
ID: 24076650
It is a window server .SO please tell me on that perspective...
0
 

Author Comment

by:coolguy2009
ID: 24077395
Hi i go to the path u said and in their i found a database name and when i opened that folder it contains many files .All are .frm file

Is that enough for restoring the data.
0
 
LVL 5

Expert Comment

by:ModarHijazi
ID: 24077561
If it's not very huge database i suggest using the 2nd method

To dump the database onto a text file: mysqldump database_name > database_name.sql

To import the data into a database: mysql database_name < database_name.sql

and this will make all for even the drop and create commands and it will lock the database while restoring it, but if you prefer the manual method don't forget to stop the service to be sure that all of the changes is written in the files then copying the files is enough.

0
 

Author Comment

by:coolguy2009
ID: 24078693
Hi,

The old database name is test99.

Now i created a new database name as test99.

But it has only the structure.But my old database only having the datas.

So i can use ur 2nd method query right?

Is i need to stop the mysql server?

Also where i need to run ur query?

Thanks
0
 
LVL 5

Accepted Solution

by:
ModarHijazi earned 500 total points
ID: 24084607
It will contain everything EVEN THE DATA, and you don't need to stop the server.
You need to run EVERYTHING from the command console:
In the following example i assumed that from the original server you have run the dump:

run -> cmd

cd %programfiles%\MySQL\MySQL Server 5.0\bin
mysqldump test99 > Test99DBscript.sql

___________________________________________
after finishing the first step you will find a file called Test99DBscript.sql in the folder %programfiles%\MySQL\MySQL Server 5.0\bin, that you need to copy to the new server then:

run -> cmd

cd %programfiles%\MySQL\MySQL Server 5.0\bin
mysql test99 < Test99DBscript.sql

___________________________________

And voila everything is perfect.
0

Featured Post

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

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

In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
Recently we ran in to an issue while running some SQL jobs where we were trying to process the cubes.  We got an error saying failure stating 'NT SERVICE\SQLSERVERAGENT does not have access to Analysis Services. So this is a way to automate that wit…
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…

710 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