RESOURCES HUB
Premium
📅
Joined
Jul 22, 2025
💬
Messages
201
👍
Thanks
1,428
🏆
Points
425
📍
Location
London
Below you will find the simplest method to reset your MySQL root password on FreeBSD.
All commands must be executed in SSH (Putty).
This starts MySQL without checking user privileges.
Run the following commands one by one:
⚠ Replace NEW_PASSWORD with your new password.
✔ Root password successfully changed
✔ MySQL running normally
✔ You can now login using the new password
All commands must be executed in SSH (Putty).
Stop MySQL Server
Code:
/usr/local/etc/rc.d/mysql-server stop
Start MySQL Without Password Check
Code:
mysqld_safe --skip-grant-tables &
This starts MySQL without checking user privileges.
Connect as Root
Code:
mysql -u root
Reset Root Password
Run the following commands one by one:
Code:
use mysql;
Code:
update user set password=PASSWORD("NEW_PASSWORD") where User='root';
Code:
flush privileges;
Code:
quit
⚠ Replace NEW_PASSWORD with your new password.
Stop MySQL Again
Code:
/usr/local/etc/rc.d/mysql-server stop
Start MySQL Normally
Code:
/usr/local/etc/rc.d/mysql-server start
Optional – Reboot Server
Code:
reboot
Done!
✔ Root password successfully changed
✔ MySQL running normally
✔ You can now login using the new password





