in reply to Starting and stopping remote mysql database through perl
You really don't want to be logging on as root on a remote machine. It's a far better idea to log on as your own user, but to allow that user to use "sudo" to restart the mysql server. Assuming that you have ssh running and an ssh key, then restarting the server could be as simple as:
ssh user@remote_server sudo /sbin/service mysqld restart
(I've assumed that you're using "service" to control mysql - you can change that to whatever command you need)
In general using "sudo" gives you far greater control over who can use particular commands on your server.
"The first rule of Perl club is you do not talk about
Perl club."
-- Chip Salzenberg
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Starting and stopping remote mysql database through perl
by shmem (Chancellor) on Jul 21, 2006 at 10:10 UTC | |
by neilwatson (Priest) on Jul 21, 2006 at 13:34 UTC |