Мы можем сбросить пароль mysql, используя mysqld_safe с параметром - skip-grant-tables .
mysqld_safe
- skip-grant-tables