MySQL root Password forgot Solution
Summary in many cases, the default password of the root user is not blank after mysql is installed. In this case, you need to log on to mysql to reset the password. Step 1: View/root /. mysql is installed in the mysql_secret file. A random password is generated for the first time. You can use this password to log on. A random password has been generated in '/root /. mysql_secret '.. Method 2: mysqladmin cannot change the password mysqld_safe -- skip-grant-tables & mysql-uroot-p use mysql; update user set PASSWORD = password ("newpassword ") where user = "root"; flush privileges; quit method 3: Add "skip-grant-tables" in/etc/my. in the cnf [mysqld] configuration section, add "skip-grant-tables" to restart mysql service mysqld restart and log on to mysql-uroot-p mysql use mysql; update user set password = password ("password") where user = 'root'; update Flush privileges; delete/etc/my. in the cnf [mysqld] configuration section, "skip-grant-tables" restart mysql service mysqld restart using the new password to log on to mysql-uroot-p. After changing the password, the first logon may report an ERROR of 'error 1820. (HY000): You must set password before executing this statement '. You need to change the current logon PASSWORD again. Change the current user password set password = PASSWORD ('20140901 ')