Re: How to import large MySQL data dump using PHP?




Brian Huether schreef:

My webhost does not give me shell access. Normally, I use this sort of
command on my local machine:

c:\data> c:\mysql\bin\mysql -uroot -pxxxxx db < file.sql

My webhost gives me PhpMyAdmin access, but I can never use that successfully
with large files. The sql file I need to import is 15MB.

This is a tricky one. I tried it myself, and only succeded by splitting
the large dump by hand, using a editor. Then you can upload it by php
myadmin.

I used this command:

mysqldump -uuser -p database --compatible=mysql323
--set-variable=net_buffer_length=16384 > totaaldump20061027

to get a format that is easily editable by hand...

It worked for me.. if you find a better solution, I'm all ears....

Paul

.



Relevant Pages

  • Re: Mass loading SQL SERVER stored procedure
    ... osql is a command line tool that can be used for this purpose. ... You just need to specify the server, database, user as well ... > open .sql file and execute the script to create SPs one by one. ...
    (microsoft.public.sqlserver.clients)
  • Re: Problem with user defined funtions
    ... You need to write you own SQL File where you set your custom ALTER TABLE ... commands for disabling constraints. ... >> replication uses sysdepends to figure out the ordering of articles. ... >> a post-snapshot command to enable the constraints. ...
    (microsoft.public.sqlserver.replication)
  • Re: Command Prompt help needed
    ... Remote scripting, and the WMI can do a lot of that kind of thing. ... > We are trying to use the SQLEXE command in command prompt to read an .sql> file on a machine and produce the results of a database in text format. ... Is there a tail> command that we put in this so that we can run the sqlexe from a machine in> our office, but the sql file and database are in an office somewhere else? ...
    (microsoft.public.windowsxp.help_and_support)
  • How to import large MySQL data dump using PHP?
    ... My webhost does not give me shell access. ... My webhost gives me PhpMyAdmin access, but I can never use that successfully ... The sql file I need to import is 15MB. ...
    (comp.lang.php)
  • Re: command to run sql statement
    ... file | open can open the SQL file in the file dialog ... and then we can execute the statement. ... > line to execute the sql statement? ... osql.exe is the command line tool for running scripts. ...
    (microsoft.public.sqlserver.programming)