M
M
Mikhail Smirnov2016-06-06 15:49:22
MySQL
Mikhail Smirnov, 2016-06-06 15:49:22

How to upload a large dump to the database?

Good afternoon!
Unloaded the database (Bitrix) from the combat server, the dump turned out to be not small, about 4 GB
, unloaded through the console with the command:
mysql -uuser -p dbname > dump.sql The
problem is that I can’t upload it to the local database now, I use the following command:
mysql - uuser -p dbname <dump.sql
The answer is immediately in a second that the dump is filled with type everything is OK. In fact, it turns out that the local database is empty.
what could be the problem?
The dump was merged from two different servers on centos 6.5
I tried to upload the dump initially on Windows, then on ubuntu - the same thing
PS: I just tried with a smaller 54Mb database of another site, the same

Answer the question

In order to leave comments, you need to log in

3 answer(s)
M
Mikhail Osher, 2016-06-06
@fortoster83

mysql -uuser -ppassword
> USE dname;
> SOURCE dump.sql;

L
landergate, 2016-06-06
@landergate

what could be the problem?

The fact that, in fact, you have not removed the dump.
This should be done with mysqldump , not mysql:
And running mysql with -u and specifying the database name does not dump the data. The utility will return you to the interactive mode for further manual operations with the selected database.
The fact that you did not take the dump is also indicated by the instant return of the console after pouring.

M
MetaDone, 2016-06-06
@MetaDone

mysql -u username -pPassword databasename < /full/path/to/dump.sql

Works quite well

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question