M
M
mihelsonkk2016-03-05 12:37:59
linux
mihelsonkk, 2016-03-05 12:37:59

How to get response from mysql client in json format in bash?

actually the mysql subject
is able to give in html or xml i
want json
advise the script - to give it data through the pipe (apparently xml), the script on stdout gives - ready json?
or are there other options?
upd as far as I understand, in the form in which I described - it cannot be solved by means of mysql itself,
but you can rewrite queries in accordance with dev.mysql.com/doc/refman/5.7/en/json.html
for example select json_array(now()) ; instead of select now();

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anton Ulanov, 2016-03-05
@antonsr98

mysql have introduced json support in latest versions

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question