Executing unix commands from mysql

When I run mysql in terminal

I can do something like \! python ~/run.pyto run the file.

However, when I copy this to php and execute mysql_query, it does not work.

+3
source share
2 answers

You cannot run any mysql commands \ prefix in PHP mysql_query.

Only valid SQL commands can be used.

+4
source

You cannot do this.

\! MySQL , MySQL. , MySQL, , (, bash). , SQL.

+2

Source: https://habr.com/ru/post/1763357/


All Articles