V
V
vlarkanov2018-02-05 11:53:48
linux
vlarkanov, 2018-02-05 11:53:48

MySQL: how to get data about the results of execution with a remote query as with a local query?

When a query is executed locally, mysql reports the number of rows modified, execution time, and so on after execution.


mysql> update testtable set comment='comment_new' where comment='comment_1';
Query OK, 1 row affected (0.03 sec)
Rows matched: 1 Changed: 1 Warnings: 0

If you execute the request remotely

mysql --user username --password paswd -h 192.168.xx --database testdb -e "update testtable set comment='comment_new' where comment='comment_1';"

then if the query succeeds, the output will be empty.
Accordingly, the question is: how to get data on the number of affected rows and query execution time during remote execution?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alex McArrow, 2018-02-05
@vlarkanov

Look aside - mysqli_affected_rows (mysql_affected_rows, PDOStatement::rowCount)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question