How to import the sql files in the file into the database in the order from top to bottom
Editor to share with you how to import the sql files in the file into the database in the order from high to bottom, I believe most people don't know much about it, so share this article for your reference. I hope you can get a lot out of it after reading this article. Let's learn about it together.
# demand #
Import each line of sql file in the file into the database from top to bottom
# execution method #
Sh import_ku.sh variable 1 variable 2 variable 3
Variable 1: the file that stores the file name of the database script
Variable 2: database user name
Variable 3: database password
Code presentation
#! / bin/bashOUTPUT= "echo-e" TAILS= "\ 033 [0m" GREEN= "\ 033 [32m" RED= "\ 033 [31m" FLICKER= "\ 033 [05m" DATA= `cat $1 | wc-l`for