i created database in mysql along with 3 tables but when i opened C:\ProgramData\MySQL\MySQL Server 5.5\data then i found on .frm files and a single .opt file
so where is my originalo datbase and data ?
my datbase name is kustkht

Dani AI

Generated

Quick summary and likely cause: seeing only .frm (table definitions) and a *.opt/db.opt file in the data folder is common when tables use the InnoDB engine and the actual row data is kept in InnoDB tablespaces rather than per-table files. That means you can see the table definitions on disk while InnoDB keeps the data in its system tablespace (or in .ibd files only if file-per-table was enabled when the table was created). was right to point at the server data directory as the place to investigate; also note Windows hides the usual ProgramData location by default. (dev.mysql.com)

How to check quickly (safe, read-only checks you can run from Workbench or any SQL client)

  • Find which engine each table uses:
SELECT TABLE_NAME, ENGINE
FROM INFORMATION_SCHEMA.TABLES
WHERE TABLE_SCHEMA = 'kustkht';
  • If tables are MyISAM you should see .MYD/.MYI files next to each .frm. If they are InnoDB and you do not see .ibd files, their data is probably in the shared InnoDB system tablespace (ibdata*). If innodb_file_per_table was ON when the table was created you’ll see .ibd per table instead. (dev.mysql.com)

Practical next steps and safe recovery workflow

  • Use Workbench’s Server / Administration panels to confirm the server’s data directory and logs, or inspect the server’s option file (my.ini) for the datadir/innodb settings. If Workbench was installed alone it might be only a client and the server could be elsewhere — verify the connection target. (mysql.com)
  • If the server is running, export the schema immediately (Workbench Export or mysqldump). Example:
mysqldump --databases kustkht --single-transaction -u root -p > kustkht.sql
  • If the server is down and you only have .frm files but lack ibdata* and ib_logfile*, InnoDB data cannot be recovered from .frm alone. Restoring InnoDB tables requires the matching InnoDB system files (and usually the same MySQL build/config); do not mix files between different instances without following the official transport/restore procedures. Always make a complete copy of the entire data directory and my.ini (stop MySQL first) before attempting manual file operations. (dev.mysql.com)

If the above steps are unclear or the server files (ibdata/ib_logfile) are missing, preserve what you have and share exact results from the two safe queries above and the file listing of the server data directory (names and sizes) so recovery options can be reviewed.

Recommended Answers

All 4 Replies

From your mysql console, run

show variables like "%dir%";

The result will contain a variable named datadir which contains the path where you should look for data files.

i don't have console facility mean i downloaded Mysql workbench 5.2
it only has interface

In a standard installation, the mysql console resides in
C:\Program Files\MySQL\MySQL Server 5.5\bin\mysql.exe

ok but files are no where :(
i am sick of searching for it.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.