How to read .frm with ibdata1 in mysql

38 Views Asked by At

I'm complete beginner no experience with MySQL at all. I've got some .frm and one ibdata1 file. I got some .frm files and the ibdata1 file. so how do i view what data it contains?

Could someone tell me step by step how to open the data that it contains? BTW I am using Ubuntu 18.

1

There are 1 best solutions below

0
Ali On

To access contents of these files in Ubuntu, you need to have MySQL installed on your system.

You can install MySQL on Ubuntu with these commands:

sudo apt update
sudo apt install mysql-server
sudo systemctl start mysql

Then you need to copy the frm and ibdata1 files to the MySQL directory, which is located at /var/lib/mysql/.

sudo cp /frm_files /var/lib/mysql/
sudo cp /ibdata1_files /var/lib/mysql/

And then restart the MySQL service with this command:

sudo systemctl restart mysql

After that, you can use the MySQL command line to access the MySQL databases and query the tables that are stored in those files.

With this command, you can log in to your MySQL server:

mysql -u root -p

Then, you can see the databases in those files with this command and do whatever you want with those data:

show databases;

Also you need to know some basic MySQL commands to see and manage your databases and tables.