user310291
user310291

Reputation: 38190

How to upload 10 Gb of data to MySQL programmatically without crashing like on PHPMyAdmin?

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 ?

Upvotes: 2

Views: 1123

Answers (2)

Pekka
Pekka

Reputation: 449465

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.

Upvotes: 8

Ignacio Vazquez-Abrams
Ignacio Vazquez-Abrams

Reputation: 798686

No. Use the command line client.

mysql -hdb.example.com -udbuser -p < fingbigquery.sql

Upvotes: 4

Related Questions