- Stop mysqld and restart it with the
to start use # /usr/bin/mysqld_safe --skip-grant-tables
- Connect to the mysqld server with this command:(you may have to use new shell / window for this)
- Issue the following statements in the mysql client. Replace the password with the password that you want to use.
UPDATE mysql.user SET Password=PASSWORD('MyNewPass')->
- stop mysqld server using service mysqld stop - make sure to stop and restart so that new service will be password protected
- restart server with service mysqld start