Solved

"Atach" mysql database

Posted on 2014-11-12
7
630 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 40

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 83

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
Connect further...control easier

With the ATEN CE624, you can now enjoy a high-quality visual experience powered by HDBaseT technology and the convenience of a single Cat6 cable to transmit uncompressed video with zero latency and multi-streaming for dual-view applications where remote access is required.

 

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 83

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

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!

Question has a verified solution.

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

Suggested Solutions

Read about achieving the basic levels of HRIS security in the workplace.
Using SQL Scripts we can save all the SQL queries as files that we use very frequently on our database later point of time. This is one of the feature present under SQL Workshop in Oracle Application Express.
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…

685 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