Automating Load SQL text file

[expired user #10941]'s profile image [expired user #10941] posted 7 years ago in General Permalink

Hello,

Does anyone know how to automate the loading of an SQL text file in Heidi? I have over 200 interlanguage link SQL text files from Wikipedia which I'd like to load in individual scripts for each database. However, I can't see to find the script for this. There is the drop down option from file, and the "source" command for the mysql command window. But what is the mysql if you are running mysql scripts in HeidiSQL to load this file?

Thanks, Tom

ansgar's profile image ansgar posted 7 years ago Permalink

Click File > "Run SQL file", and select all 200 files. Easy, or?

If you want them to be run in different databases load them one by one, by hand? 200 files should not take too long.

[expired user #10941]'s profile image [expired user #10941] posted 7 years ago Permalink

These files are huge. The French interlanguage file is 880 MG and is taking about 20 hrs to insert each item. Isn't what you suggest manual? Is there no MySQL command that I could write into a script? I can't find one that works in Heidi.

[expired user #1502]'s profile image [expired user #1502] posted 7 years ago Permalink

I believe you should use mysql cli instead (you can put it in cron/scheduler if you like).

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