No announcement yet.

PHP - MySQL install script!

  • Filter
  • Time
  • Show
Clear All
new posts

  • PHP - MySQL install script!

    I've uploaded vB Beta 3 onto my server, and I want to copy the present MySQL database into a duplicat one so I can test & get used to the new software before going live.

    My db is 20MB, and has been backed up in a txt file on my machine and the server, but the hosts control panel won't handle files that big. Telnet, etc is not allowed, and they say they are too short staffed to do it for me!!

    Theit reply to my last email was;
    'Generally for larger databases or more robust coding I would recommend a Perl script installed into your account.'

    What PHP script would this be, and were do I get a copy?

    I did get this code elsewhere on the forum, but it gives an error, and stops. All the data & variables are correct and someone else did have the same problem, but no conclusion followed.

    = "username";
    $Password = "password";
    $db = "vb";
    $dumpfile = "/forumbackup-06-22-2003.sql";
    passthru("mysql -h ".$host." -u ".$user." -p".$Password." ".$db." < ".$dumpfile);

    Thanks in advance.
    Professional Punting Made Easy
    Win2Win Racing @

  • #2
    Too short staffed to run a simple command?... that's a bit harsh, hope customer support wasn't one of their big selling points.

    Have you tried restoring it though phpmyadmin? or were you doing it though the cpanel backup/restore feature? There are perl scripts out there that should be able to do it as well, I'm not sure of any easy solutions off hand though.

    Pester your host a bit more I say


    widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.