esoe 2 years ago
parent
commit
42d4dc311e
  1. 12
      sql/README.md

12
sql/README.md

@ -3,10 +3,10 @@ @@ -3,10 +3,10 @@
- [хорошая статья на хабре / шпаргалка](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"
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;
sql>>> source /path/to/script.sql
source \\home\\user\\Desktop\\test.sql;
Loading…
Cancel
Save