C
C
chief2021-03-06 09:57:38
MySQL
chief, 2021-03-06 09:57:38

Is it possible to transfer the MYSQL database by copying the folder with the name of the database?

A banal situation: there is a mysql database on the old server, it must be transferred to a new one.

Is it possible to transfer the database by copying the folder with the name of the database?
Well, or rather, first create an empty database with the same name on the new server and copy the .MYD files from the old server into it.

Answer the question

In order to leave comments, you need to log in

6 answer(s)
A
alekssamos, 2021-03-06
@alekssamos

all the same, it’s better through import and export, as intended, as expected.

C
CityCat4, 2021-03-06
@CityCat4

If the database type is MyISAM - you can
If InnoDB - no
But why suffer? Phpmyadmin does a great job of importing and exporting. And of course the banal mysqldump

V
Vladislav, 2021-03-06
@cr1gger

I tried it did not work for me, but the database appeared and all the tables.
But you click on it, writes the table does not exist. Although visually they are in phpMyAdmin

S
Somewhere Intech, 2021-03-06
@john36allTa

No. If you need to automate the transfer between hosts, use mysqldump, mysqladmin

L
Leonid, 2021-03-06
@caballero

it is better to create an empty database and then recopy the files; it
will work if the Myisam files and the mysql version are up to eight
and the operating system is the same either Windows or Linux

M
mefutu, 2021-03-06
@mefutu

You have mysql, go through php admin and export the database. If you don't have phpadmin, there are plenty of portable versions on the internet.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question