I am trying to import a more or less large database ( 1Gb
) using PHPMyAdmin
.
The process is too slow and always cuts out.
Is there a way to import a database MySQL
from the command line?
I am trying to import a more or less large database ( 1Gb
) using PHPMyAdmin
.
The process is too slow and always cuts out.
Is there a way to import a database MySQL
from the command line?
Using
mysqldump
I was able to import a filesql
directly into the database.On Linux or Windows
cmd
:Indicating the password ( insecure ):
on Windows
Powershell
Indicating the password ( insecure ):
Reference:
I have not tested the answer that I will give with files
.sql
of that size1GB
, however I will share it with you.sql
inside Drive C for example with a descriptive namemysql
execute the followingThe console depending on the number of tables should be returning something similar to the following
CLARIFICATIONS
If the file
.sql
already contains in its structure the declarations of:CREATE DATABASE
Y
Then it is not necessary to create it but simply execute said command
.sql
, then:must first be executed
And later
so that in the end we execute
References