Hi
if you want check, repair and optimize all tables on server you can use this commands.
mysqlcheck -uda_admin -p`grep "^passwd=" /usr/local/directadmin/conf/mysql.conf | cut -d= -f2` --auto-repair --optimize --all-databases
this command start all mysql's one by one
Regards