0

I am executing a query remotely using mysql utility and also through mysqlsh utility. I see that with mysql, entire dataset is loaded in memory at once, whereas in case of mysqlsh, it appears to be fetching a single row or a subset of rows at a time. I want to achieve the same behaviour as mysql in mysqlsh. Any configurations available for this in mysqlsh ?

mysql -h <> -p <> database < query.sql
user2599052
  • 1,056
  • 3
  • 12
  • 27
  • Is MySQL Shell a vanilla terminal, or is it a specific application? Because, if it's just a terminal, then nothing stops you from sending several queries, with the limit clause being defined according to your needs, so it will gradually get the results, using a paging. – Lajos Arpad Jan 20 '21 at 09:44
  • @LajosArpad from vanilla terminal. i would be eventually invoking this from a shell script and I dont want to send multiple requests. I would like to send single request as can in the case of mysql utility – user2599052 Jan 20 '21 at 09:51
  • What OS are you using? – Lajos Arpad Jan 20 '21 at 10:20
  • @LajosArpad ubuntu – user2599052 Jan 20 '21 at 10:20
  • Maybe I'm wrong here, but nc seems to be something that you might be able to use for your purpose: https://linuxhint.com/send_receive_udp_packets_linux_cli/ – Lajos Arpad Jan 20 '21 at 10:27
  • Not sure what exact problem is here, but have you tried `mysqlsh user@host --sql -f query.sql`? – kgr Jan 26 '21 at 00:36

0 Answers0