3

I copy my database files from windows

wamp/bin/mysql/mysql5.6.17/data

into my ubuntu

/var/lib/mysql/

Folders of my database_name and ibdata1, ib_logfile0, ib_logfile1 files. Now my all databases and tables are visible into phpmyadmin but when selecting any table, it shows table doesn't exist

How to get back my all the data

Here is the screenshot.

3
  • First I would check if the file system permissions in /var/lib/mysql/ are correct for the mysql system user to access your data Commented Feb 22, 2017 at 11:14
  • I have run this command. $ sudo chown -R mysql:mysql /var/lib/mysql/ Commented Feb 22, 2017 at 11:15
  • Have you considered dumping the database using mysql tooling, rather than copying the folder structure? It sounds like you may not have all the files needed, are there any errors (other than "table doesn't exist") in your mysql logs? Also, a silly question, but did you restart mysql after copying and chown'ing the files? Commented Mar 6, 2017 at 8:44

2 Answers 2

3

After Googling a lot I found the answer.

Restart your mysql

sudo mysql stop

sudo mysql start

Refresh the phpmyadmin page

1
  • 1
    Thank you for posting this question and answer. Very illogic that restarting an sql server solves the problem of a table missing in a database import. Commented Oct 15, 2020 at 7:58
0

I have solved the problem in ubuntu 18.2 using >> sudo chown -R mysql:mysql var/mysql/

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.