How do I load 10GB of data into MySQL programmatically without crashing like PHPMyAdmin?

I am very surprised that it is not possible to load more than a few megabytes of data into the mysql database via PHPMyAdmin, whereas I can easily load the msaccess table up to 2 gigabytes.

So, is there any script in php or anything that can do this as opposed to phpmyadmin?

+2


a source to share


2 answers


PhpMyAdmin is based on HTML and PHP. Both technologies were never built and never intended to handle this kind of data.

A common way to get around this would be to transfer the file to a remote server - for example, using a protocol like (S) FTP, SSH, Samba share, or whatever - and then import it locally using the command mysql



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 or re-import the data, but copies the data directories directly) mysqlhotcopy . However, it only works on Unix / Linux and Netware servers.

+8


a source


No. Use a command line client.



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

      

+4


a source







All Articles