My system was crashed. I try to import my database from .frm files. I copied those files to my new mysql server location . '/var/lib/mysql'. I gave the change the priviledge. I had one database.
I just compied the following files to my database foloder name 'my_school'.
- ibdata1
- ib_logfile0
- ib_logfile1
I copied the whole folder to mysql folder location in ubuntu 14.04, /var/lib/mysql
I gave the privileges to this folder using this command.
chown mysql:mysql /var/lib/mysql/my_school -R
Then, I try to access the database. I can access the database. I can see the tables. but, it give error when I try to see the table structure or data.
the error it show this is.
ERROR 1146 (42S02): Table doesn't exist but both table files (frm, ibd) exists on the file system
I used these solutions, these solution doesn't work.
- MySQL > Table doesn't exist. But it does (or it should)
- MySQL > Table doesn't exist. But it does (or it should)
Please, help.
- Is .frm file contain both data and structure of the data ?
- what is purpose of ibdata1 file?
- what is purpose of ibd_logfile0 and ibd_logfile1 ?