Web Hosting Talk







View Full Version : Export/Import 50mb MySQL database without Telnet/SSH?


kreativ
07-01-2002, 03:19 AM
Is it possible to export/import a large (50mb) MySQL databse without Telnet/SSH access?

It seems phpMyAdmin times out when attempting to export a large MySQl database.

apollo
07-01-2002, 04:03 AM
Here you go!

1.) Create a script that dumps data from file to MySQL
2.) upload script to your cgi-bin or any other place you can run cgi or php
3.) upload data file
4.) Write another php/cgi that executes script (see number 1. above) in background process (for perl its:
system("/path/to/script/script.pl&")
for php must be something similar - dont forget the & sign. This is a script that will be executed in Unix shell...
5.) Access the script (see number 1.) with your web browser.

Thats it:) Wait for a while until the script loads data into MySQL.

(Basically, you create two scripts. You access first script using your web browser that runs another script in unix shell in background...)

Ps. dont forget that you need to have the rights to load data from file into mysql db....

okihost
07-01-2002, 10:32 AM
Or to make it a little more simple ask for your old sql dump upload it to your site and ask your host to import it for you.. I have found that it seems all DB's over 20 megs timeout in myphpadmin so we just do it manually for users.

apollo
07-01-2002, 11:39 AM
OKIhost is right :) That is much easier if you ask your hosting provider to do it for you :)

AtlantaWebhost.com
07-01-2002, 02:28 PM
How common is it for hosting accounts with MySQL database support not to have SSH access?

The mysql command line tools are very very helpful ;-) It is also nice to be able to gzip dump files to reduce bandwidth consumption and upload/download times.

Best regards,
Frank Rietta

Scotty_B
07-01-2002, 02:48 PM
http://www.phpmybackup.com works fine for me on a 40mb db

mwatkins
07-01-2002, 07:48 PM
The issue is script time out. If you are running your own version of PhpMyAdmin (not the hosts version) and/or have control over PHP.INI settings, increase the time out.

Voila.

iamdave
07-01-2002, 07:50 PM
Originally posted by AtlantaWebhost.com
How common is it for hosting accounts with MySQL database support not to have SSH access?

The mysql command line tools are very very helpful ;-) It is also nice to be able to gzip dump files to reduce bandwidth consumption and upload/download times.

Best regards,
Frank Rietta Not too many hosts offer Telnet/SSH access, as it is a security risk.