The following steps can be taken on a FreeBSD server to reset the root password of a mysql server:

# /usr/local/etc/rc.d/mysql-server stop
# /usr/local/bin/mysqld_safe --skip-grant-tables &
# mysql -u root
> UPDATE user SET Password=PASSWORD(‘new_password’) WHERE User=’root’;
> exit
# /usr/local/etc/rc.d/mysql-server restart