Reputation: 1211
I have a MySQL database and I want to know the exact location where this data actually stored in the XAMPP folder, I went to this file location to try to get the information:
xampp -> mysql -> data ->
Here I found a separate folder for each of my databases and within these folders I saw files stored with the .frm format (FRM FILE)
.
When I copied my desired database with all tables in .frm format
and try to use them on another PC, I was given an empty database of the same name.
Where are the data files for the database kept on the local server?
Upvotes: 43
Views: 261967
Reputation:
Rather late I know, but you can use SELECT @@datadir
to get the information.
Happy file huntin' SO community :)
This is how it looks when ran in phpmyadmin:
Upvotes: 19
Reputation: 1054
Just in case you forgot or avoided to copy through PHPMYADMIN export feature..
Procedure: You can manually copy: Procedure For MAC OS, for latest versions of XAMPP
Location : Find the database folders here /Users/XXXXUSER/XAMPP/xamppfiles/var/mysql..
Solution: Copy the entire folder with database names into your new xampp in similar folder.
Upvotes: 4
Reputation: 81
Copy and paste the entire data folder, not just the content.
I use xampp, and the path to the data is xampp/mysql/data
.
Upvotes: 8
Reputation: 21
If you are like me, and manually installed your webserver without using Xampp or some other installer,
Your data is probably stored at C:\ProgramData\MySQL\MySQL Server 5.6\data
Upvotes: 2
Reputation: 1457
Your database is in this directory:
C:\xampp\mysql\data
Upvotes: 39
Reputation: 91
Data are store in this path. You can search data location, just put the below address in your search location (url address):
C:\xampp\mysql\data
Upvotes: 6
Reputation: 794
For Mac, your database files are located at:
/Applications/XAMPP/xamppfiles/var/mysql
You might need admin permissions to access or delete your files.
Upvotes: 47
Reputation: 13166
I think the matter is your tables engine. I guess you are using InnoDB for your table. So you can not copy files easily to make a copy.
Take a look at these links:
http://dev.mysql.com/doc/refman/5.0/en/innodb-backup.html
http://dev.mysql.com/doc/refman/5.0/en/innodb-migration.html
Also I recommend you to use something like phpMyAdmin for creating your backup file and then restore the backup file on the next machine using the same IDE.
Upvotes: 13
Reputation: 100175
The exact location is stored in "my.ini" which exists under main mysql installation directory. In my.ini file, look for 'datadir'. This parameter points the data folder.
Upvotes: 6