15 Replies - 6369 Views - Last Post: 30 September 2011 - 01:18 PM

Can't find the data directory in MySQL!

Posted 30 September 2011 - 11:29 AM

Hi, I recently installed MySQL 5.5, and created a database and populated it with tables and data. However I cannot find any trace of these data in the data directory, even though the querying and updating in the MySQL client window works alright, suggesting that the data is okay, but I can't find it. Now the [mysqld] section in the my.ini file says that the path to the database root is datadir="C:/ProgramData/MySQL/MySQL Server 5.5/Data/". However there is no directory such as ProgramData under the C drive. There is one data directory under the MySQL folder, and it in turn contains two folders, mysql and performance_schema. Each contains a series of MYI, MYD and frm files, but the ones I am looking for, like Teams.MYD, Teams.MYI, Teams.frm (Teams is one of the many tables I have set up in the database Tennis) aren't there. Can anyone tell me where can I find those files?

Re: Can't find the data directory in MySQL!

Posted 30 September 2011 - 12:06 PM

No no, I am not trying to tinker with them, I am just trying to locate them. I am reading the book MySQL by Paul Dubois, and it contains a chapter named Data Directory, where I found these things. Then I tried to locate where they are, and I couldn't. Please tell me how can I locate them.

Re: Can't find the data directory in MySQL!

Posted 30 September 2011 - 12:37 PM

However, I didn't properly understand what they are saying. they are asking me to change the datadir location in the my.ini file. How do I do that, when the file itself is not to be found anywhere? Plus if I set the file location to a new one, won't that create problems while querying and stuff?

Re: Can't find the data directory in MySQL!

Posted 30 September 2011 - 12:44 PM

No no, I am not talking of the book! I am talking about the contents of the page you gave me the link to. Scroll down to see the section as I have shown in the image below. If I chane the datadir location to say C:/MySQL/data/, then how can I move the contents of the existing MySQL data directory before restarting the MySQL server?

Re: Can't find the data directory in MySQL!

Posted 30 September 2011 - 12:57 PM

Oh ho, I knew this, just thought that maybe the MySQL installation does some nasty things with this folder and merely showing hidden folders options won't do the thing. Thank you so much for hearing my prayer!