How to change the root user password of mysql in XAMPP environment
Recently, some customers forgot the mysql root user password. using mysqld_safe cannot start mysql normally, nor can they modify the root password in mysql manual.
Website teaching website webmaster note: Today, some students forgot the password when they installed it by default. The three students were very cute and did not find the password after nearly one hour of research. I was asked, I did not find it for half a day. I finally tried it. in the XAMPP environment, the default MYSQL password installed is empty! No password is set at all!
The php environment installed by the customer is xampp1.6.7. re-installing xampp can solve this problem, but you need to re-install Yike CRM and restore CRM data. this method is a bit problematic.
To restore the mysql permission database, decompress the xampp installation file and upload the mysql database under the var directory to the client's server. the password of the root user becomes empty, in this way, you can log on to the mysql console, but the "user table is read only" prompt is displayed after you change the root password. you cannot change the root user password.
Google "user table is read only" and find a method. after mysqladmin-u root flush-tables executes this command, you can modify the password of the root user, you also need to set the mysql database folder permission in the var directory to writable.
If you have added another mysql user, you need to add a new user and the corresponding permissions.