0 votes
1 view
in SQL by (20.3k points)

I'm looking to be able to run a single query on a remote server in a scripted task.

For example, intuitively, I would imagine it would go something like:

mysql -uroot -p -hslavedb.mydomain.com mydb_production "select * from users;"

1 Answer

0 votes
by (40.4k points)

Try the below query:

mysql -u <user> -p -e "select * from schema.table"

Related questions

+2 votes
1 answer
0 votes
1 answer
+1 vote
1 answer
asked May 29, 2019 in R Programming by Ritik (3.5k points)
Welcome to Intellipaat Community. Get your technical queries answered by top developers !