I’m trying to get
`mysql -uroot`;
to enter the MySQL interactive client just as executing
$ mysql -uroot
from the shell does.
It’s okay if the PHP script exists after (or before), but I need it to invoke the MySQL client.
I’ve tried using proc_open() and of course system(), exec() and passthru(). Wondering if anyone has any tips.
New solution:
Old one:
Save for tab completion (you could probably get it in there if you read out bytes with fread instead of using fgets), this gets you on your way, lots left to tweak: