Answer the question
In order to leave comments, you need to log in
How to create a script to get data from sql database?
Good afternoon!
The task in the following:
There is a database and the rights to it for reading. It is necessary to execute a request to it once a day in automatic mode and upload the result to a file. To do this, there is a virtual machine on Centos. I don't even know how to approach this problem. Google suggests bash scripts. Maybe there is a solution?
Or has someone already done something like this?
Answer the question
In order to leave comments, you need to log in
echo "SELECT * FROM \`database\`.\`table\`" | mysql -uUser -pPassword -hHost > /out/file/name
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question