how to run a windows cmd file to run commands as an automated job.

I need to automate dataloading into my mariadB database.

I'm a super noob.. apologies in advance....

I created two cmd files......


[My File].... data.cmd

CD C:\Program Files (x86)\MariaDB 10.3\bin

mysql -h -u root < Z:\dataloader.cmd


[My File].... dataloader

mysql -h -u root KPDashboard < Z:\collection\vinfo_data-load.sql

mysql -h -u root KPDashboard < Z:\collection\datastore-sql-loader.sql

mysql -h -u root KPDashboard < Z:\collection\host-sql-loader.sql

I created a windows cmd file (data) to open the maridB prompt and run the lines in (data loader) as a scheduled task...

This runs but when I check via heidiSQL it show no data was loaded.. so epic fail? .

If I open the mariadb cmd prompt and run the dataloder.cmd it runs and updates my dB.

So I'missing something somewhere?

Can anyone provide some direction.




Comments loading...
Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.