开发者

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 m开发者_如何学JAVAsaccess table easily up to 2 Gigabytes.

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


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.


No. Use the command line client.

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

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜