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
I thought you could just copy the damn dbfile in mysql, maybe they have improved tho :)
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
and wait.
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.
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.
otherwise it is possible the to copy the dbfile.. officially not recommended but haven't noticed problems so far with this method.
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) ;)
mysql db_name < script.sql
btw you meant LAMP (Linux not Windows) ;)
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 :)
I work with WAMP from home (windows), but fedora is LAMP... but with the sql text file is no problem where I'm running
I've created a verb "to zest". I wanted to write "and then what zest said"
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.
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).
Just as easy, if you have ssh access to the mysql server...
Code:
mysql -u root -p
source /path/myfile.sql
lolzor.
uu bisst so fukked up as .addmin i .kkan only ttell uu!
uu bisst so fukked up as .addmin i .kkan only ttell uu!
just copy the files from mysql/data/dbname to the new place. or use mysqlimport.