Tags: mysql

Upgrade MySQL from ports (in FreeBSD)

Categories: BSD
Tags:
Published on: June 12, 2009

So next time i’ll not forget!
1) STOP MySQL service

/usr/local/etc/rc.d/mysql-server stop

2) Upgrade with pkg_add, portupgrade, manually, ecc.

3) Start MySQL service

/usr/local/etc/rc.d/mysql-server start

4) And remember to run

mysql_upgrade -u root -p

Backup all MySQL databases and other important stuff on FreeBSD

Categories: BSD
Tags: , ,
Published on: June 9, 2009

This is the (bash) script that i use for backup all MySQL databases and other important stuffs like etc/ dir, configuration files in /usr/local/etc and whatever you want.
As you can see, it’s launched 3 times a week by cron, on sunday, wednesday and friday at 23:55. It create a list of installed packages, dump all MySQL databases, sync important files and dirs with rsync and finally create a tar.gz of backupped files.
It would be interesting add one cool thing, after tar.gz is done it could be copied via scp to another host (and it would be a better backup :P).

Actually i haven’t a pc running 24/7 (old good OpenBSD gateway, i miss you!!) and i download manually the tar.gz the morning after (shame on me) :P
NB: MySQL backup part is partially taken from a GREAT MySQL backup script and adapted to my needs. Script is from bash.cybercity.biz
http://bash.cyberciti.biz/mysql/freebsd-nas-backup-mysql-shell-script/

(more…)

page 1 of 1
Please support our sponsors ;)
Welcome , today is Wednesday, February 8, 2012