dibaliklayar

Friday, February 17, 2006

Start / stop mysql with cron

CRON job to shut down MySQL. To CRON the shutdown of MySQL without screen presence (i.e, "Press any key"), one has to follow these steps:

1. Start mysqld using this command:
mysqld_safe --autoclose
This will automatically close MySQL server screen after shutdown.

2. Shut down MySQL using this command:
mysqladmin -u root shutdown -a
This will automatically close the mysqladmin screen after shutdown is complete.

The mysqlhotcopy utility will back up only MyISAM tables. To back up InnoDB tables, shut down MySQL server using mysqladmin and take the normal file system backup MySQL data directory.

0 Comments:

Post a Comment

<< Home