Diferencia entre revisiones de «MySQL»
De gacq wiki
(→Tools) |
(→Tools) |
||
Línea 5: | Línea 5: | ||
=Tools= | =Tools= | ||
*PHPMyAdmin | *PHPMyAdmin | ||
+ | *mytop | ||
+ | *mtop | ||
*[http://www.xaprb.com/innotop innotop] | *[http://www.xaprb.com/innotop innotop] | ||
**[http://www.xaprb.com/blog/2006/07/02/innotop-mysql-innodb-monitor/ innotop Article] | **[http://www.xaprb.com/blog/2006/07/02/innotop-mysql-innodb-monitor/ innotop Article] |
Revisión del 16:54 23 oct 2006
Contenido
Documentation
Tools
- PHPMyAdmin
- mytop
- mtop
- innotop
Performance
Integration
Authentication using LDAP, kerberos, etc is not ready yet
Common task
Change password
set password = password("yournewpassword");
Scripts
Hot backup - All databases
#!/bin/sh # by gacq # # MySQL root password PASSWORD=$1 OUTPUTDIR="/srv/backup/mysql" # Delete backups older than the number of days specified in DAYS DAYS=8 date=`date +%F_%T | tr \: _` mysqldump --all-databases --password=$PASSWORD | gzip > $OUTPUTDIR/all-databases-${date}.sql.gz # Delete older backups find $OUTPUTDIR -type f -name "all-databases.*.sql" -ctime $DAYS -exec rm -f {} \;
Hot backup - One database
#!/bin/sh # by gacq # PASSWORD=$1 DATABASE=$2 OUTPUTDIR="/srv/backup/mysql" # Delete backups older than the number of days specified in DAYS DAYS=8 date=`date +%F_%T | tr \: _` mysqldump --password=$PASSWORD $DATABASE | gzip > $OUTPUTDIR/$DATABASE-${date}.sql.gz # Delete older backups find $OUTPUTDIR -type f -name "all-databases.*.sql" -ctime $DAYS -exec rm -f {} \;
Selected databases
databases="db1 db2 db3" for db in `echo $databases` do mysqldump -uroot -p$passwd $db | gzip > $dir/mySQL/mySQLdump-$db.dump.gz done