command line mysql export

Hi guys, I need to configure a cronjob for my new MYSQL database. I already have some backup scripts that do a complete dump. I need a one line script that will do exports for all my tables one-by-one , more or less like the export script for Oracle databases. The reason is, it easier and faster to import a single table. Let me have some help on this end. -- Regards, Allan M 0722-266-146 *That I may know Him (Christ), and the Power of His Resurrection....*

One line? - not really. Write a bash script to run from cron: mysql - show tables > tablefile for... extract table names one by one mysqldump - just the table > tablename.sql That's the bare bones of it - holler if you need more help ;) Cheers, Tony On 21/12/2015, Allan M via skunkworks <skunkworks@lists.my.co.ke> wrote:
Hi guys, I need to configure a cronjob for my new MYSQL database. I already have some backup scripts that do a complete dump. I need a one line script that will do exports for all my tables one-by-one , more or less like the export script for Oracle databases. The reason is, it easier and faster to import a single table. Let me have some help on this end.
-- Regards,
Allan M 0722-266-146
*That I may know Him (Christ), and the Power of His Resurrection....*
-- Tony White

Are you using Linux or Windows? On Mon, Dec 21, 2015 at 9:45 AM, Allan M via skunkworks < skunkworks@lists.my.co.ke> wrote:
Hi guys, I need to configure a cronjob for my new MYSQL database. I already have some backup scripts that do a complete dump. I need a one line script that will do exports for all my tables one-by-one , more or less like the export script for Oracle databases. The reason is, it easier and faster to import a single table. Let me have some help on this end.
-- Regards,
Allan M 0722-266-146
*That I may know Him (Christ), and the Power of His Resurrection....*
_______________________________________________ skunkworks mailing list skunkworks@lists.my.co.ke ------------ List info, subscribe/unsubscribe http://lists.my.co.ke/cgi-bin/mailman/listinfo/skunkworks ------------
Skunkworks Rules http://my.co.ke/phpbb/viewtopic.php?f=24&t=94 ------------ Other services @ http://my.co.ke

Allan, There is no one line solution for dumping all tables in MySQL. As Tony say, you can do a bash script to do that, but if you have PHP running on your server, here is a small elegant PHP script that can do the same. Remember to change the script to work with your environment. This work well in Linux. If you are using Windows, you can tailor it to work with Windows. The folder structure will be different but I think PHP and MySQL dump will work the same way. On Mon, Dec 21, 2015 at 10:05 AM, Philip Musyoki <pmusyoki@gmail.com> wrote:
Are you using Linux or Windows?
On Mon, Dec 21, 2015 at 9:45 AM, Allan M via skunkworks < skunkworks@lists.my.co.ke> wrote:
Hi guys, I need to configure a cronjob for my new MYSQL database. I already have some backup scripts that do a complete dump. I need a one line script that will do exports for all my tables one-by-one , more or less like the export script for Oracle databases. The reason is, it easier and faster to import a single table. Let me have some help on this end.
-- Regards,
Allan M 0722-266-146
*That I may know Him (Christ), and the Power of His Resurrection....*
_______________________________________________ skunkworks mailing list skunkworks@lists.my.co.ke ------------ List info, subscribe/unsubscribe http://lists.my.co.ke/cgi-bin/mailman/listinfo/skunkworks ------------
Skunkworks Rules http://my.co.ke/phpbb/viewtopic.php?f=24&t=94 ------------ Other services @ http://my.co.ke
participants (3)
-
Allan M
-
Philip Musyoki
-
Tony White