To change MySql database root password We have to restart MySql server with skip_grant_table option. Edit my.cnf for linux file or my.ini file for windows and add following line in this file. skip_grant_table=1skip_grant_table=1 Then restart MySql Service. After restart you can log in MySql server without using password. Change root password by running.