title: Export mysql database / mysql tables in json format through command line OR PHP
body: <p>I have big information table. I want to export it in json format for some other purpose. I could export in xml format using the below command. </p>
  
  <p><code>mysql -u root -p --xml -e "SELECT * FROM db_name.tbl_name" &gt; d:\export.xml</code></p>
  
  <p>I tried something like the below for json format. 
  <code>mysql -u root -p --json -e "SELECT * FROM db_name.tbl_name" &gt; d:\export.json</code></p>
  
  <p>I got the error message <code>unknown option '--json'</code></p>
  
  <p><strong>PS:</strong> I could not able to use any third party application like PHPMyadmin / workbench / SQLyog due to large size of table. </p>
  
  <p>It would be greatly appreciated if you help me on this.</p>