mysqldump How to use locally
I have a number of MySQL large, about 2 GB all together database split into smaller sections of various sizes
I want to use it locally, to test it,
I've tried BigDump but this is slow and returns errors, (Line 3001, file sizes are basically too big).
I've tried to change some settings in BigDump to get it to work locally but it just crashes, my file sizes are just too big for local use.
I use BigDump to set up on the server, (I just have cPanel, phpmyadmin), this works well but far, far too slow. I only have 2Mb/s speed, (and that is the fastest download, upload is slower).
I manly use PERL
I have tried the below DOS Batch command and this definetly connects to the database as the please_add_this_on.sql is changed locally after using this command.
If I change the > to a < it displays the database in the DOS window.
But I wanted to add the please_add_this_on.sql to the database that is locally working
The first SQL file has the header to drop the database, and set up the variables etc...
Then each SQL file I want to add on is just a text file made similar to this:-
INSERT INTO `database_name` VALUES ('TESTLINE1 ', 'TEST LINE 1’, 'more data');
INSERT INTO `database_name` VALUES ('TESTLINE 2', 'TEST LINE 2’, 'more data');
My SQL databases are fine they work well on the server host, although it’s a pain to change them because of my internet and BigDump speed
Is there a way to add the databases together as one and do this locally?
Is there a quicker way to update the databases remotely?
You will see below I use the wamp server locally
bat file:
@ECHO OFF
CLS
ECHO.
ECHO mysqldump
ECHO.
C:
CD\
CD \wamp\bin\mysql\mysql5.1.30\bin
mysqldump --user=root --password=databasepassword --opt databasename > please_add_this_on.sql
ECHO.
ECHO Finished.
ECHO.
PAUSE
ECHO.
Last edited by TrafficProducer; 12-16-2008 at 05:11 PM.
|