I am exporting a part of MySQL Database as JSON Format. I want to do this from mysql-cli without using any web interfaces like phpmyadmin or softwares like mysqlworkbench.
I am aware that I can do so by using php json_encode()
function after a mysql query.
But are there any methods that can be used, so that I can write a mysql query to get the dump as JSON.
I used php to do this.
json_encode($result);