Importing a very large .sql file

1

I have a file with about 192.2 MB in size. I tried importing it through PHPMyAdmin but it complains that the file is too big. I searched the internet for a possible solution to the case, and saw that it has to be through the "source" example:

mysql > source: nomeDoArquivo.sql

I did exactly this way but it always returns me error.

Failed to open file 'cep_mysql.sql', error: 2

Does anyone know of any way I can do this? Did I do wrong is needed by the file in some specific directory? Thanks!

    
asked by anonymous 11.11.2015 / 15:17

1 answer

3

There are a few ways to import data into MySQL. By its necessity, and apparently has access to execute commands on a client capable of connecting to the server, I think the following model is more appropriate:

In the directory where your SQL statement file is located, type:

mysql -u NOME_USUARIO -h HOST -p NOME_BASE_DADOS < arquivo.sql

You will be prompted for the connection password.

Other ways to import data from a SQL file can be found here

link

    
11.11.2015 / 16:33