I have uninstalled the old XAMPP and deleted all of the content of d:\xampp folder and installed the new one. When I copy my backup folder (with the name of my database, containing all .frm and .opt files) to the D:\xampp\mysql\data, the database shows in the list in phpmyadmin but it has no tables and data. What I've done wrong?
You have to shut down mysql server (which is not good, if it's a production server) You have to make sure the permission of data (mysql) directory is same as the previous one.
Here's how I dealt with this kind of situation:
data folder from your new xampp installation folder <physical_drive>/xampp/mysql.
(The
datafolder contains the schema/table definitions (.frm files) for your tables.)
data folder from your previous xampp folder (or the backup) under mysql and paste it to the new location (i.e. <physical_drive>/xampp/mysql).There you go, the tables should show up with their structures as you click on them. 
Note: Make sure you leave the bin folder under your xampp installation folder untouched.
It is possible, I found out a solution:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With