Where is database file of MySql
hi every one,
well my problem is that i dont know where is store database file in mysql. if you know that let me know
like Sql server have created DBL file in Sql server2005 but in mysql which name of database file and what is the Extenstion of it. if u know then please tell me its too urgent
thanks in Advance


Kirtan PatelRank #292 · 8.6K reputationPosted Nov 26, 2009, 1:49 AM EST
for each Database it creates a New Folder :)
for in my computer i want to know the path for database "test"
then it will be
C:\ProgramData\MySQL\MySQL Server 5.1\data\test
Lalit MRank #1,186 · 1.5K reputationPosted Nov 25, 2009, 1:48 AM EST
Naeem KhanRank #2,072 · 698 reputationPosted Nov 25, 2009, 1:58 AM EST
Lalit MRank #1,186 · 1.5K reputationPosted Nov 25, 2009, 2:15 AM EST
Hi,
Try this steps
---------------
1) Locate the my.ini, which store in the MySQL installation folder.
For Example,
2) Open the "my.ini" with our favor text editor.
#Path to installation directory. All paths are usually resolved relative to this. basedir="C:/Program Files/MySQL/MySQL Server 5.1/" #Path to the database root datadir="C:/Documents and Settings/All Users/Application Data/MySQL/MySQL Server 5.1/Data/"Find the "datadir", this is the where does MySQL stored the data in Windows.
Naeem KhanRank #2,072 · 698 reputationPosted Nov 25, 2009, 9:40 AM EST
Kirtan PatelRank #292 · 8.6K reputationPosted Nov 25, 2009, 4:17 PM EST
you can always back up your database by running simply two commands at mysqlPromt that will produce compressed archive file for you :)
Naeem KhanRank #2,072 · 698 reputationPosted Nov 25, 2009, 8:13 PM EST
theLizardRank #1,079 · 1.8K reputationPosted Nov 25, 2009, 10:40 PM EST
c:\installation path\DATA\your database name
You should also realize that each table in the database is represented as a file in this folder so if your database has 5 tables then you will see 5 files [table name] with the extension .frm in the DATA\database name folder plus a db.?? file
One thing you have not said is what you are going to do with this information? are you going to distribute the files to other computer systems, what?
If you are, how are you going to make the database visible to the MySql installation on the target system, will the target system have MySql installed?
What do you know about ODBC DSN's? Do you know how to programatically add the DSN to the ODBC administrator?
If you want to be a software developer you will need to know these things, you also need to know the registry and where and how to find registry keys relating to software installations.
knowing where the files are is just one part of your problem
theLizardRank #1,079 · 1.8K reputationPosted Nov 26, 2009, 9:05 AM EST
Naim, 'Software Developer', you have a long way to go before you can call yourself that, you are on training wheels along with Kirtan.
Kirtan PatelRank #292 · 8.6K reputationPosted Nov 26, 2009, 4:44 PM EST
Friend,
I have not copied your answer but I have given answer in my own way that normal user can understand easily..
and btw you failed to teach the solution to user in easy way that's your problem not mine :)
theLizardRank #1,079 · 1.8K reputationPosted Nov 26, 2009, 5:16 PM EST
Teaching is NOT doing the work for someone it is giving enough information so that the student can go and learn how to do it for themselves.
You tend to ask people for their code so that you can do the work of solving their problem, how is this teaching anyone.
If people know they can get someone else to do their work why would they bother to think for themselves, this forum appears to have a lot of these people asking someone else how to do something.
Yes newbies should be given a little more help but they should also be encouraged to think for themselves.