SHOW [FULL] PROCESSLIST
http://dev.mysql.com/doc/mysql/en/show-processlist.html
But, a couple of ways that I achieve this is by using the command below
if you have grep and cut availble:
mysqladmin processlist | grep



|
SHOW [FULL] PROCESSLIST With mysqldump anyone can write a small shell script and running it from cron, it will achieve an automatic backup solution AutoMySQLBackup can backup a single database, multiple databases, or all the databases on the server; each database is saved in a separate file that can be compressed (with gzip or bzip2); it will rotate the backups and not keep them filling your hard drive (as normal in the daily backup you will have only the last 7 days of backups, the weekly if enabled will have one for each week, etc.). # Username to access the MySQL server e.g. dbuser # Username to access the MySQL server e.g. password # Host name (or IP address) of MySQL server e.g localhost # List of DBNAMES for Daily/Weekly Backup e.g. "DB1 DB2 DB3" # Backup directory location e.g /backups
./automysqlbackup.sh.2.5 You can just dump it in the /etc/cron.daily/ folder and you should be done. . ln -s automysqlbackup.sh.2.5 automysqlbackup.shand run it from cron by placing in /etc/crontab something like: #MySQL Daily backup Download AutoMySQLBackup A script to take daily, weekly and monthly backups of your MySQL databases using mysqldump. Features - Backup mutiple databases - Single backup file or to a seperate file for each DB - Compress backup files - Backup remote servers - E-mail logs – More
Backup mutiple MySQL databases with one script. (Now able to backup ALL databases on a server easily. no longer need to specify each database seperately)
Can email the compressed database backup files to the specified email address. AutoMySQLBackup Download The AutoMySQLBackup project has now been moved to Sourceforge.net for better maintainence. http://sourceforge.net/projects/automysqlbackup/ AutoMySQLBackup Requirements The AutoMySQLBackup script only requires mysqldump (A standard utility provided with the mysql client) and gzip or bzip2 for compression of the backup files. If you would like to have the log emailed to you then you will need to have permission to execute the "mail" program. If you want the compressed backup files mailed to you then Mutt must be available on the server. What AutoMySQLBackup does Every day AutoMySQLBackup will run (if setup on /etc/cron.daily) and using mysqldump and gzip will dump your specified databases to the /backups/daily directory, it will rotate daily backups weekly so you should never have more than 7 backups in there.. Every Saturday AutoMySQLBackup will again backup the databases you have chosen but they will be placed into /backups/weekly, these will be rotated every 5 weeks so there should never be more than 5 backups in there.. Every 1st of the month AutoMySQLBackup will create a backup of all databases and place them into /backups/monthly. These will never be rotated so it will be up to you to do your own house keeping. I would suggest taking a copy of this offline every month or two so that if you have a hard drive failure you will be able to restore your database.. AutoMySQLBackup Installation Download :AutoMySQLBackup Download The install is as simple as editing a few variables in the AutoMySQLBackup file. The full setup is documented in the AutoMySQLBackup script file below the variables section.. Here is a quick minimum setup step by step.. 1. Download automysqlbackup.sh and place it into your /etc/cron.daily directory or your home directory. 2. Edit (at least) the following lines :- # Username to access the MySQL server e.g. password # List of DBNAMES for Daily/Weekly Backup e.g. "DB1 DB2 DB3" # Backup directory location e.g /backups
4. Create the following directory./backups
|
|
|