pouët.net

Mysql question

category: general [glöplog]
 
I'm working on WAMP in a website. The database is huge, some hundreds of megabytes of harddisk occupied by it. My dedicated server is Fedora. If I try using phpmyadmin and sql textmode format export/import for the database dump, I have problems since the size of database. Do you know any easy for linux begginers like me to upload the database with files by ftp? Thanks
added on the 2006-12-01 12:39:36 by texel texel
I thought you could just copy the damn dbfile in mysql, maybe they have improved tho :)
added on the 2006-12-01 13:22:47 by Hatikvah Hatikvah
WAMP is windows right? I dont know much about mysql on windows but there is a "mysqldump" on linux so you get the database into a text file that holds all the sql-commands to recreate the database. could get that from phpmyadmin by changin the maximum execution time of php-scripts i guess.

copy that file to the linux box, then on the linux box do

Code: cat the_file.sql | mysql -u root the_database


and wait.
added on the 2006-12-01 13:29:33 by steam steam
does compression of the dump help? i.e. a pipe to gzip or bzip2?

otherwise it is possible the to copy the dbfile.. officially not recommended but haven't noticed problems so far with this method.
added on the 2006-12-01 13:29:48 by earx earx
mmm texel i guess you have root access to your dedicated box, so you can just ftp your script file then execute it through the shell command line like this :
mysql db_name < script.sql

btw you meant LAMP (Linux not Windows) ;)
added on the 2006-12-01 13:33:27 by Zest Zest
yeah, thanks so much for the ideas... I've not have these... but first dumping to sql text from windows, then gzip compression, upload to ftp and finally decompress and zest... THANKS SO MUCH :)
added on the 2006-12-01 13:37:48 by texel texel
I work with WAMP from home (windows), but fedora is LAMP... but with the sql text file is no problem where I'm running
added on the 2006-12-01 13:39:13 by texel texel
I've created a verb "to zest". I wanted to write "and then what zest said"
added on the 2006-12-01 13:39:53 by texel texel
um...

mysqldump [mysqldump options] | bzip2 | ssh texel@texels.linux.box "bzcat - | mysql db_name"

or similar would save you the temporary file. You could also set up replication between the two servers... and since Windows doesn't generally understand the concept of pipes, forks, or other space/time saving devices, it may be the only way to avoid the tempfile overhead.

bzip2 over gzip, as well.

Yes I dislike wasting space.
well, it is not about wasting hd space in my server, I don't care about it since I've yet 100gb free. It is about upload time. In spain we have shitty 300 kbps upload yet (I can't get more than 31 kbytes per second upload).
added on the 2006-12-01 20:41:21 by texel texel
Just as easy, if you have ssh access to the mysql server...

Code:mysql -u root -p source /path/myfile.sql

added on the 2006-12-01 20:54:17 by defbase defbase
lolzor.

uu bisst so fukked up as .addmin i .kkan only ttell uu!
added on the 2006-12-02 02:41:33 by Hatikvah Hatikvah
just copy the files from mysql/data/dbname to the new place. or use mysqlimport.
added on the 2006-12-02 12:14:57 by blasty blasty

login