I have allocated almost all of my space on the production server to my table space
Now i have an compressed dump of around 20gb which is needed to be dumped into mysql
The problem is the server is not having much space to uncompress the file (which requires around 120 gb)
i have used the beolw command but i am a failure because it is first uncompressing the file and then redirecting the output to mysql
gunzip dbdump.sql.gz | mysql -u root -proot123 -S /home/mysql55/tmp/mysql.sock
Is there any way so that i can dump the compressed file without uncompressing it
any suggestions are really grateful
You can do this with the following command: gzip -c db-20180518060048. sql.
To import an SQL dump file: Connect to your MySQL database. Choose Import > From SQL Dump… from the File menu. This will bring up a dialog box, select the file on your file system that you would like to import, then click Import . Your database will now be updated.
I know this is ridiculous, but it was gzipped twice, so
filename.sql.gz
filename.sql
to filename.gz
Hope it will work
You should tell gunzip
to write to standard out. What you are doing right now is not going to pipe any output at all.
gunzip -c dbdump.sql.gz | mysql (args...)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With