tags:

views:

84

answers:

2

I'm very surprised that it seems impossible to upload more than a few megabytes of data to mysql database through PHPMyAdmin whereas I can upload a msaccess table easily up to 2 Gigabytes.

So is there any script in php or anything that can allow to do so unlike phpmyadmin ?

+4  A: 

No. Use the command line client.

mysql -hdb.example.com -udbuser -p < fingbigquery.sql
Ignacio Vazquez-Abrams
ok thanks will try (hope it would use buffer as my ram is not as big as 10 Go :))
+8  A: 

PhpMyAdmin is based on HTML and PHP. Both technologies were not built and never intended to handle such amounts of data.

The usual way to go about this would be transferring the file to the remote server - for example using a protocol like (S)FTP, SSH, a Samba share or whatever - and then import it locally using the mysql command:

mysql -u username -p -h localhost databasename < infile.sql

another very fast way to exchange data between two servers with the same mySQL version (it doesn't dump and re-import the data but copies the data directories directly) is mysqlhotcopy. It runs on Unix/Linux and Netware based servers only, though.

Pekka
I need to upload from outside mysql (from text file exported by a datawarehouse db) so I can't use mysqlhotcopy but will be very usefull indeed as I'll have to be able to backup such a huge database later.