-1

I have a mysql database on a server that is around 4 gb in size and I couldn't get it downloaded to my local machine. I tried getting a dump on the server, but the dump is not getting created probably because of the big size. Is there any way, I could get the dump downloaded on my local machine?

I can syncing using Sqlyog but I know it will take ages. Is there a way, I can get a dump created on the server?

By the way, my server is a linux server and its running php/mysql.

Ctroy
  • 101
  • 1

2 Answers2

1

If you want to create the dump on the server and transfer it afterwards, you will have to tell us what the error is when you try to create it.

If you just want it on your local desktop: Download the MySQL workbench, make sure you have appropriate privileges to acccess the database from this machine (or maybe use SSH port forwarding) and use the dump tool. Works flawless for me.

Sven
  • 98,649
  • 14
  • 180
  • 226
  • When I used mysqlworkbench, the windows gets closed in just under a minute. When I tried to execute the dump script using SSH earlier, it gets stopped in the middle after taking the dump for 1.5 GB. – Ctroy Feb 02 '11 at 08:44
  • Is there a log entry for mysql that might give a hint about what's going wrong? Also, did you tell the workbench to create a dump folder or a self contained file? For a 4GB database, use the folder, as it will create a file for every table. Also, do you use a recent version of the workbench? Older versions crashed *really* easy. And last: Do you have enough space left on the device where you want to store the dump? Depending on your data, the dump can get more than twice as big as your original data. – Sven Feb 02 '11 at 08:53
0

Well you havent stated exactly what error youre getting, but you can shrink the file significantly by passing it through gzip. Since you said youre running linux, this is really easy to do

mysqldump -u USER -p --all-databases | gzip > /path/to/store/dump.sql.gz

Of course, tune the mysqldump parameters as necessary. But since the mysqldump output is largely ASCII, gzip will compress it extremely well.

phemmer
  • 5,909
  • 2
  • 27
  • 36