MySQL 5 administration
Some random information about MySQL administration.
Installation
When you finished installation and compilation, on UNIX you must run some setup scripts. In particular, mysql_install_db. This script must be ran as the mysql user, else if you run it as root you will get failures later. Eg do something as:
sudo -u mysql mysql_install_db
Backup & Restore
The backup can be done as:
mysqldump -u root -p --all-databases > backup.sql
The restore as:
mysql -u root -p < backup.sql
Warning: if you do that, the MySQL user table will change and you will need to restart the server to see the changes (although of course, there is probably a better way than simply restarting).