Démarrer mysql avec la ligne de commande suivante
freebsd# mysqld_safe --skip-grant-tables & [1] 5802 freebsd# Starting mysqld daemon with databases from /var/db/mysql
Connecter vous en root sans mot de passe
freebsd# mysql -u root mysql Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 2 Server version: 5.0.77 FreeBSD port: mysql-server-5.0.77_1 Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
Modifier le mot de passe de l'utilisateur root
mysql> update user set password=password('nvmot2passe') where user='root'; Query OK, 3 rows affected (0.01 sec) Rows matched: 3 Changed: 3 Warnings: 0 mysql> exit Bye freebsd#
Puis redémarrez mysql normalement.