From b4e98b153950c9efcce27bf156d75ff050ae729a Mon Sep 17 00:00:00 2001 From: esoe Date: Thu, 12 Jan 2023 08:43:33 +0300 Subject: [PATCH] qq --- sql/README.md | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/sql/README.md b/sql/README.md index cfc3afe..a28aec5 100644 --- a/sql/README.md +++ b/sql/README.md @@ -1,3 +1,12 @@ # SQL ## linlks / ссылки -- [хорошая статья на хабре / шпаргалка](https://habr.com/ru/post/564390/) \ No newline at end of file +- [хорошая статья на хабре / шпаргалка](https://habr.com/ru/post/564390/) + +## Извлечение команд sql из файла +echo "source /path/to/script.sql" | mysql -u root -proot -D database +cat /Desktop/test.sql | sudo mysql -uroot -p +mysql -u yourusername -p yourpassword yourdatabase < query_file > results_file +mysql --user="username" --database="databasename" --password="yourpassword" < "filepath" + +sql>>> source /path/to/script.sql +source \\home\\user\\Desktop\\test.sql; \ No newline at end of file