Solved

myd export from server

Posted on 2009-04-06
11
453 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
  • 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
U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

 
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

Suggested Solutions

Title # Comments Views Activity
Virtual SQL Server 2014 Standard 35 91
SQL Activity Monitor detail 2 25
MS SQL SERVER and ADODB.commands 8 20
SQL View / Qtry 3 11
For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
When table data gets too large to manage or queries take too long to execute the solution is often to buy bigger hardware or assign more CPUs and memory resources to the machine to solve the problem. However, the best, cheapest and most effective so…
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…
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.

856 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