MySQL

Links
HowTo at gentoo-wiki

HowTo at gentoo.org

Install
Exclude Berkeley DB supporte: "Berkeley DB support is deprecated and will be removed in future versions"

Secure installation
This script will secure mysql. Like disabling anonymous, setting security options and set root password.

and follow the white rabbit :-)

Change the root password? n

Remove anonymous users? [Y/n] y

Disallow root login remotely? [Y/n] y

Remove test database and access to it? [Y/n] y

Reload privilege tables now? [Y/n] y

Logs
Logs

Setting permissions
To set permissions you can use this script: mysql_setpermission.

Links
HOWTO Backup MySQL at gentoo-wiki

http://gentoo-wiki.com/MySQL/Backup

http://www.devshed.com/c/a/MySQL/Backing-up-and-restoring-your-MySQL-Database/1/

http://dev.mysql.com/doc/refman/5.0/en/backup.html

How to Reset the Root Password
You can set the new password using the mysql client (but this approach is less secure):

1. Stop mysqld and restart it with the --skip-grant-tables option.

2. Connect to the mysqld server with this command:

3. Issue the following statements in the mysql client. Replace the password with the password that you want to use.

You should now be able to connect to MySQL as root using the new password.

Links
http://dev.mysql.com/doc/refman/5.1/en/resetting-permissions.html