how to move/configure Mysql Database to another partition?

As root:

  1. Cleanly shut down MySQL (myqsladmin shutdown)
  2. Edit /etc/my.cnf and set the data-dir configuration option to the new location of your MySQL data directory.
  3. Move your entire data directory to the new location, ie: mv /var/lib/mysql/* /mnt/mysql/
  4. Ensure permissions are correct, chown -R mysql:mysql /mnt/mysql
  5. Start MySQL as usual.