Solved

"Atach" mysql database

Posted on 2014-11-12
7
602 Views
Last Modified: 2014-11-14
Hi,

In SqlServer i can copy database files from a pc to another pc, and then attach and view tables with management studio. I can do the "same" with phpadmin, but when i create dbfile and import sqlquery for ex. Now i have a folder with some mysql files (I think that will be the tables of the database)  and i need "attach" or import database to phpadmin to export some data, is possible?

best regards
0
Comment
Question by:rflorencio
7 Comments
 
LVL 39

Expert Comment

by:lcohan
ID: 40438337
0
 

Author Comment

by:rflorencio
ID: 40439437
Hi,

Although I'm not so familiar with mysql, it seems to me that to do what you tell the server would have to be active. The problem is that I have only the files and are not "attached" to the server.

best regards
0
 
LVL 82

Expert Comment

by:Dave Baldwin
ID: 40439514
That's confusing.  MySQL does not 'attach' databases like SQL Server does.

phpMyAdmin won't connect to a MySQL installation unless MySQL is running.  Give us an example of the file names.  If they are '*.sql', then you should be able to import them into MySQL with either phpMyAdmin or at the command line.
0
Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

 

Author Comment

by:rflorencio
ID: 40439781
Hi,

As I have said many have little knowledge in mysql. Supposedly I have a series of files .MYD, .MYI that I think will be tables that belong to a data base. I do not have access to the server where this database was, only have the files. Intend to read the content and then export to sqlserver, like a .sql script.

thanks
0
 
LVL 82

Accepted Solution

by:
Dave Baldwin earned 400 total points
ID: 40440542
No, that won't work, those are not in 'SQL' format.  ".MYD" and ".MYI" are the 'data' and 'index' file for a MyISAM database.  You can put them in a directory for their database and restart MySQL and see if it picks them up.
0
 
LVL 20

Assisted Solution

by:Muhammad Wasif
Muhammad Wasif earned 100 total points
ID: 40440851
There must be files like .frm. Without them, you may not be able get the data as Dave has suggested. If you have all three files e.g. table1.FRM, table1.MYD and table1.MYI (or atleast .FRM and .MYD) then you can read the data as Dave suggested.
0
 

Author Closing Comment

by:rflorencio
ID: 40442140
Thanks
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Suggested Solutions

Introduction Since I wrote the original article about Handling Date and Time in PHP and MySQL (http://www.experts-exchange.com/articles/201/Handling-Date-and-Time-in-PHP-and-MySQL.html) several years ago, it seemed like now was a good time to updat…
Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

708 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

13 Experts available now in Live!

Get 1:1 Help Now