Tagged Questions
5
votes
3answers
6k views
Run multiple sql files in mysql batch
to run a single file you can run in mysql
.\ filename
or you outside of mysql you can run
mysql < filename
I have a directory of sql files so I'm trying to run them all at once by ...
4
votes
4answers
5k views
JDBC batch insert performance
I need to insert a couple hundreds of millions of records into the mysql db. I'm batch inserting it 1 million at a time. Please see my code below. It seems to be slow. Is there any way to optimize ...
4
votes
6answers
727 views
How can I get a Windows batch or Perl script to run when a file is added to a directory?
I am trying to write a script that will parse a local file and upload its contents to a MySQL database. Right now, I am thinking that a batch script that runs a Perl script would work, but am not sure ...
4
votes
1answer
922 views
Insert into mysql
I want to pass parameters to a batch file which will then inserted into mysql database.
lunch.bat name surname
echo off
mysql -uusername -ppassword -e "set @1:=name; set @2:=surname; source ...
4
votes
3answers
850 views
Separating data from a constantly appended file into a new file
I am using a macro to export a table in a Microsoft Access database to a csv file in order to import into a mysql database. I ended up using a batchfile that would place a marker in the text file ...
3
votes
2answers
3k views
JDBC batch query for high performance
I want to do batch query DB for high performance, example sql to query based on different customer_id:
select order_id,
cost
from customer c
join order o using(id)
where c.id = ...
...
3
votes
1answer
198 views
User authentication from batch file
How can I authenticate a valid user already registered on mysql automatically ? (Can be a batchscript, or vbs or anything that run automatically from windows) and if the user exist and the password is ...
2
votes
5answers
6k views
Batch-file for mysqldump to backup each database into a separate file
Trying to create a batch (cmd) file for backing up each database into a separate file.
Databases are created/deleted often, so batch file needs to grab current db names everytime it runs and backup ...
2
votes
1answer
1k views
MySQL batch update statement with different IDs
Is there any single SQL statement equivalent to these?
UPDATE table_name SET (a = 'something', b='B1') WHERE id=1;
UPDATE table_name SET (a = 'something else', b='B2') WHERE id=2;
UPDATE table_name ...
2
votes
1answer
334 views
MYSQL/PHP BATCH UPDATE
I want to create a batch delete and/or update screen for records similar to how the iphone lets you batch delete text messages In other words when you click edit, it shows a checkbox next to all the ...
2
votes
2answers
4k views
How to create mysqldump batch file?
I tried to create a batch file that can backup all my databases. My systems details:
OS: Server -> Windows Server 2003, Testing/local machine -> Windows Vista
Databases: MySql 5.XX
Batch ...
2
votes
1answer
230 views
preparedStatement and resultSet interfaces how to use batch and get methods
I am starting now to use the package java.sql and I am doing some experiments with it.
I have these two tables
the first is:
`user` (
`userID` INT NOT NULL AUTO_INCREMENT ,
`nickname` VARCHAR(20) ...
2
votes
4answers
125 views
Database query speed
I have a php script which runs continuously several hours and every few seconds I have new data to save in a database. So I have the option to store new data when it becomes available or gather them ...
2
votes
1answer
63 views
Disable My SQL Foreign Key Constrain (FOREIGN_KEY_CHECKS ) from bat file
I need to run around 100 .sql files from a batch file for loading data into a look up table in our application. I need to disable constains before loading process starts and enable it again after the ...
2
votes
1answer
884 views
batch mysql script / schedule run the batch job
Is there a way to create a batch or a text file to execute .sql ?
Let say :
script location : C:\test.sql
Hostname : host.name
Port : 1000
user : me
password : pw
test.sql -- >
select * from ...