On 11/08/10 00:13, Paul Willis wrote:
> Hi
>
> I'm trying to shutdown MySQL on an Ubuntu 10.04 server for half hour everyday
> using cron but I can't get it to work
Not sure why you want to, but hey ho. (IIRC I've created a "backup" user
before and just given it lock_tables privilege to all data
The other thing you could do rather than stopping mysqld completely is
do to a LOCK TABLES then
FLUSH TABLES, which avoids you having to stop the server, suspend
transactions, and run crontabs as root. (obviously, you'll need to
UNLOCK TABLES again afterwards)
This could all be in the backup
On 11 August 2010 07:01, Simon Greenwood wrote:
> Not sure of the detail but it will be something that's present in the shell
> that's not present in the session invoked from cron. As Sean says, logging
> the event will give you a clue as to why it's failing. I would suggest that
> you will need t
On 11 August 2010 00:13, Paul Willis wrote:
> Hi
>
> I'm trying to shutdown MySQL on an Ubuntu 10.04 server for half hour
> everyday using cron but I can't get it to work
>
> Using "sudo crontab -e" I entered the line...
>
> 15 19 * * * root /etc/init.d/mysql stop
>
> In the syslog I can see it f
Why don't you write to a logfile then any errors that might be
occurring can be looked for
ie.
15 19 * * * root /etc/init.d/mysql stop >/var/log/mysql-stop.log 2>&1
2>&1 tells it to send errors, as well as messages, to the logfile (in
case you're not familiar with that syntax)...
Sean
--
ubun
My Apologies for the top post, getting used to a new email client.
Daniel
--
ubuntu-uk@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-uk
https://wiki.ubuntu.com/UKTeam/
Hi Paul,
Are you sure that stops mysql? You should be stopping the daemon: "mysqld"
not mysql
Daniel
On 11 August 2010 00:13, Paul Willis wrote:
> Hi
>
> I'm trying to shutdown MySQL on an Ubuntu 10.04 server for half hour
> everyday using cron but I can't get it to work
>
> Using "sudo crontab
Hi
I'm trying to shutdown MySQL on an Ubuntu 10.04 server for half hour everyday
using cron but I can't get it to work
Using "sudo crontab -e" I entered the line...
15 19 * * * root /etc/init.d/mysql stop
In the syslog I can see it fired at the time I expected...
Aug 10 19:15:01 domU-11-11-11