MySQL commands (not SQL statements) from PHP

andrewlee_foo

New Member
Is it possible to, from within a PHP script, execute the same commands you could with the MySQL client? I know I could theoretically call 'system' to invoke the mysql client installed on the system, but I am not sure how to avoid interactivity (I don't want a REPL/shell, I just want to fire a command). Is there a way to execute commands via the mysql client without going into the shell? In either case this approach seems a bit sketchy.To clarify, when I say command I am referring to the follow: http://dev.mysql.com/doc/refman/5.0/en/mysql-commands.html
 
Back
Top