Get the App
SLTechnology News&Howtos  ›  Database  › 

How to import the sql files in the file into the database in the order from top to bottom

Shulou Source: shulou.com Published: 2022-05-31 13:50:19 09月22日 Update

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

Tags: Files data databases variables articles order content not much code most passwords file names methods more users user names knowledge results scripts industry Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Tech Info vpn Linux Apple Microsoft