# Where is the 'data' folder of MySQL ?



## UnPluGs (May 1, 2005)

Good day..

I'm newbie in web developing using apache+php+mySQL in MacOSX platform.
Before this, I used to develop web application using apache+php+mySQL in windows platform.

May I know where is the location of 'Data' folder of MySQL in MacOSX? In Windows, it is located in C://MySQL/Data

The reason I wan to know the location is because I want to move my database from windows to MacOSX, so that I don't need to create the database again. I tried to search... but I can't find the path.

Really urgently need your help. Thanks a lot.


----------



## wadesworld (May 1, 2005)

I think it's /usr/loca/mysql/data, but since I don't have MySQL installed at the moment, I can't double-check that.

Of course if you use Fink to install it, it will be under the /sw tree.

To search for it, use the unix find command, rather than using the GUI Find (which doesn't search "hidden" directories like /usr by default)

Wade


----------



## UnPluGs (May 1, 2005)

Dear Wade,

       I search dy... searched nothing. 

       Where I should put the database folder (Project database, which is in Windows C://MySQL/Data folder) in MacOSX ? 

        Sorry.... I'm really a newbie in MacOSX.


----------



## UnPluGs (May 1, 2005)

I type 'cd /usr/local/mysql/data'
then it gave me "Permission denied"..... Whats wroing with this? Anyone can help?


----------



## UnPluGs (May 1, 2005)

another issue, when I type "drop database 'databasename'", it comes out this message:
Error 1010: Error dropping database (can't rmdir './v/', errno: 17)

Anyone can help me... ? Thanks....


----------



## vina_melody (May 2, 2005)

UnPluGs said:
			
		

> I type 'cd /usr/local/mysql/data'
> then it gave me "Permission denied"..... Whats wroing with this? Anyone can help?



i did have the same problem ... in Windows, the folder is open for public but in Mac, they protect it... ok, this is how to solve:

first, you go to that folder simply from Finder (from Go menu), then right click the "data" folder and choose Get Info
in the ownership & permissions, the default is mysql, you change it to your user name but dont close the Get Info window.

next, there;ll be some database names' folder, right cliick on the database name you want then choose Get Info, change the user permission to your name again. after that, you can see the contents 

after you finish modifying the folder, you have to change back the permission   reversely ( the folder "data" should be the last) .. remember..
unless, i don;t know , when i did this mistake, i couldn;t fix it until i reinstall the mysql

well, hope this will help you


----------



## vina_melody (May 2, 2005)

for the 2nd issue, i think rmdir can;t delete directory if it has contents, may be rm -f can .. but i;m not sure.. another think, i could happen because of the permission problem too...


----------



## wadesworld (May 4, 2005)

If mysql is installed on your system, then this command will find it:

sudo find / -name mysql

Wade


----------



## UnPluGs (May 21, 2005)

Thanks a lot... Vina Melody~


I found it and it works !!!
thanks.


----------



## vina_melody (May 30, 2005)

you're welcome 
sorry  for late reply... now have fun with mySQL


----------

