티스토리 뷰

공부

[MySQL] mysql -e 'source query.sql'

승가비 2022. 1. 10. 17:52
728x90

https://stackoverflow.com/questions/35592034/how-do-i-add-database-name-with-hyphen-character-using-script-in-ubuntu/35592181

 

how do i add database name with hyphen character using script in ubuntu

I've tried using this code in a script but it just created what is inside the backtick. In this example, "echo "table-db"" was created in the database. It didn't create the name of the folder with ...

stackoverflow.com

https://stackoverflow.com/questions/8055694/how-to-execute-a-mysql-command-from-a-shell-script/8055745

 

How to execute a MySQL command from a shell script?

How can I execute an SQL command through a shell script so that I can make it automated? I want to restore data I have collected in a SQL file using a shell script. I want to connect to a server and

stackoverflow.com

 

728x90
댓글