Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Execute Shell command over MySql on remote host

Tags:

mysql

Is it possible to login into a remote mysql machine and execute commands using 'system' on the remote machine. I can log into the remote machine, but commands using: 'system' are executed at my local machine. Thanks indeed!

I using mysql to connect from 'Host1' to 'Host2' using the command

mysql -uUsername -p data_base_name -h Host2

When I execute

'system hostname' 

after I'm connected i get.

'Host1'
like image 481
cb0 Avatar asked Aug 15 '11 09:08

cb0


1 Answers

I cannot log into my remote host using ssh. I don't know why. I need to do some log analysis and the only option I have is to connect to that machine using mysql. I can connect to that machine! –

As far as I know, this is definitely not possible. It's far beyond the scope of mySQL, and there would be immense security implications if it were.

I don't think there is an alternative to getting SSH (or some other service that might help) running again.

like image 193
Pekka Avatar answered Sep 21 '22 14:09

Pekka