Importing a very large . sql file

Asked

Viewed 1,776 times

1

I have a file about 192.2 MB in size. I tried to import it through Phpmyadmin, but he complains that the file is too big. I searched the internet for a possible solution to the case, and I 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 any way I can do this? Did wrong is necessary to put the file in some specific directory? Grateful!

1 answer

3


There are some ways to import data into Mysql. Due to its necessity, and since it apparently has access to execute commands on a client capable of connecting to the server, I believe the following model is more appropriate:

In the directory where your SQL instruction file is, type:

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

The connection password will be requested.

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

http://dev.mysql.com/doc/refman/5.1/en/mysql-batch-commands.html

Browser other questions tagged

You are not signed in. Login or sign up in order to post.