How to automatically export a database to Google Spreadsheet?

[expired user #10999]'s profile image [expired user #10999] posted 6 years ago in Import/Export Permalink

I'm new to SQL and HeidiSQL, and don't really have an idea on how to automatically export databases, or even if it is possible. If it is, can someone help me achieve this?

If you need to ask anything go ahead and I will try and give you the best answer.

archfrog's profile image archfrog posted 6 years ago Permalink

If you want to automatically export a database, the procedure will vary with the database engine you use. I only know about MySQL/MariaDB; for these you need to use the 'mysqldump' command-line tool to export a database:

mysqldump --user=USER --password=PASSWORD --host=SERVER database > database.sql

I don't think you can do this with HeidiSQL itself, albeit I'm not entirely sure.

ansgar's profile image ansgar posted 6 years ago Permalink

With HeidiSQL you can export databases, but not in an automatic way. I never aimed to implement that in Heidi, as mysqldump can exactly do what you want.

[expired user #10999]'s profile image [expired user #10999] posted 6 years ago Permalink

Right, okay. Could someone explain more about what to do, as I am pretty much completely new to HeidiSQL.

ansgar's profile image ansgar posted 6 years ago Permalink

In the "Data" and in the "Query" tab(s), you can rightclick the data result, then click "Export grid rows". This will bring up a dialog which you should take a loot at right now. Most of it should be intuitive. Feel free to ask for the things you find difficult.

[expired user #10999]'s profile image [expired user #10999] posted 6 years ago Permalink

Hey, sorry this is 2 weeks late, but I put this off as I usually just manually export the databases, but you guys said something about "mysqldump". Can someone help me configure this, so it automatically dumps one of my tables from my database, say every hour or so.

I have tried looking online but it all seems very alien to me, so any help/references to easy guides to do this will be appreciated.

Please login to leave a reply, or register at first.