I want to import a 600mb .sql file into phpMyAdmin. As I have memory limitation in server, I can't use import option given in phpMyAdmin.
Asked
Active
Viewed 930 times
-1
-
you cant do that in phpmyadmin however in mysql cli you can do so. – Abhik Chakraborty Jun 04 '14 at 09:39
-
This is a duplicate of http://stackoverflow.com/questions/15278375/importing-larger-sql-files-into-mysql – Dom Jun 04 '14 at 09:45
-
I'm getting this error `#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'mysql -u
–-password= – Anurag Prashant Jun 04 '14 at 10:55< newmagdb.sql' at line 1`
4 Answers
1
mysql -u username –-password=password database_name < file.sql
If it's not clear, look for how to load from a dump file.

Goon10
- 150
- 4
0
mysql -u [username] -p [dbname] < [path for the sql file to be imported]
You can use this in mysql command prompt.

prava
- 3,916
- 2
- 24
- 35
0
PHPMyAdmin Can only do this if the server settings are sufficiently generous to allow you to upload such a large file.
If you have command line client then you should use the mysql client. If you don't have command line access then MySQLDumper is a very good tool for importing large SQL files.

Dom
- 2,980
- 2
- 28
- 41
0
If you have memory limitations in the server and you are using phpmyadmin, you have to manually split the sql file or use a tool to split the file based on your memory restrictions and import file by file.

DC-
- 797
- 9
- 14