V
V
Vladislav2021-06-21 08:44:23
MySQL
Vladislav, 2021-06-21 08:44:23

How to quickly import a large database?

I put import of basis for the night today.
Through the console with the command:
source dump.sql

And everything went with these query requests. But only 11 hours have already passed and it seems to be just finishing up, judging by the pages in phpMyAdmin, is there a faster option?
It's just that "Buy an ssd" yes, I know, but also?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Dimonchik, 2021-06-21
@cr1gger

in general, if from the bells and whistles, in addition to data, only indexes (not triggers / procedures that can be tied to the id of related tables), then the fastest way is to load from file (I don’t remember the command, LOAD DATA INFILE etc) and in the MyISAM table and then its envelope in InnoDB
, well, then hanging indexes and triggers, with an understanding of what and how and in what place
if it’s just a dump - look here - something can be tweaked:
https://dba.stackexchange.com/questions/83125/mysq...
again, just a dump minimizes manual involvement, unlike file and related issues with same encodings, field sizes Etc

S
Sergey, 2021-06-21
@sslion

if the mysql database is easier to do through the console, open the console and enter
mysql -v ,
the version of mysql should be displayed, if not, then it’s sad
if yes, then we continue (without quotes) All that remains for us is to study the messages in the console about the progress of the operations contained in the dump.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question