May 2024
M T W T F S S
 12345
6789101112
13141516171819
20212223242526
2728293031  

Categories

May 2024
M T W T F S S
 12345
6789101112
13141516171819
20212223242526
2728293031  

Mysql source

Executing number of sql queries at a time using “source” command

Make all the queries in a single file, here i opened a file called “ctechz.sql” and saved all sql queries in this file.

# mysql -uroot -pmysql

mysql> use dbname;  —– be in that database
and then run the “source”  command to update the queries into the tables.

mysql> source ctechz.sql

it will execute all sql queries in the file ctechz.sql at the same time. When you are using the #mysql command to log into the db make sure that you are doing this from the direcory where you placed the ctechz.sql file.

You will see quite a bit of output as mysql reads queries from the ctechz.sql file and executes them.

Leave a Reply

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>