D
D
Dmitry Vyatkin2015-09-04 00:59:03
linux
Dmitry Vyatkin, 2015-09-04 00:59:03

How to manually add a database?

I completely copied the /var/lib/mysql/ folder from one computer, I upload the databases I need to the same folder on another computer, the databases and tables are displayed in the console upon request, and when I request show columns from table, an error pops up

ERROR 1932 (42S02): Table 'name table' doesn't exist in engine

Can I somehow add the databases I need in this way and not use mysqldump and other methods?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
R
Ruslan Fedoseev, 2015-09-04
@martin74ua

innodb tables are stored in the ibdata file, not in the base directory. Therefore, you will be able to restore innodb only completely.
Better still, mysqldump

A
Alexey Yamschikov, 2015-09-04
@mobilesfinks

Copied the entire /var/lib/mysql/ folder

If you just copied the contents of the folder, then on another computer you should be fine. You probably didn't copy everything. You need to copy on a stopped mysql and you also need to stop before throwing.
If from tools, then it is better to use xtrabackup from Perkona for full copying, and not mysqldump.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question