I experience a strange problem on our 3 node MariaDB cluster (10.2.24). Queries send over the command line are received by the cluster but don't get executed. MySQL does not return any errors or warnings. When I execute the query in a mysql shell all queries are executed without any problem.

Bash example (not working)

# mysql -uUSER -p -hDBSERVER -e "UPDATE table SET field='test' WHERE status='test';" database


echo "UPDATE table SET field='test' WHERE status='test';" | mysql -uUSER -p -hDBSERVER database


 # mysql -uUSER -p -hDBSERVER -e "SELECT field FROM table WHERE status='test';" database

 | field         |
 | production    |

MySQL cli example (working)

mysql> UPDATE table SET field='test' WHERE status='test';

Query OK, 1 row affected (0.00 sec)
Rows matched: 1  Changed: 1  Warnings: 0


mysql> SELECT database.field FROM table WHERE status='test';

| field         |
| test          |


Distributor ID: Ubuntu
Description:    Ubuntu 16.04.6 LTS
Release:        16.04
Codename:       xenial



MySQL version

mysql --version
Ver 15.1 Distrib 10.2.24-MariaDB, for debian-linux-gnu (x86_64) using readline 5.2

Does anybody know what's going on here or how I can solve this problem?

  • Unfortunately there are not errors or warnings in the log files. It was the first thing i checked. – subhead Jun 11 '19 at 11:44
  • General_log is enabled. I dont see anything in it besided the connection itself. In the slow_query log i can see 1 affected row. So i can say for sure that the correct sql server is responding. – subhead Jun 11 '19 at 11:59
  • 1
    Your second bash test created a file named mysql. That is not what you wanted. For that case, use | (pipe to), not > (send stdout to file). – Rick James Jun 11 '19 at 16:52
  • ah sorry that was a misstake by me. i use a pipe there and the problem is still the same. i changed my question above. – subhead Jun 12 '19 at 8:32
  • What is the setting for autocommit? – Rick James Jun 13 '19 at 5:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.