How to change the root user password of mysql in XAMPP environment _ MySQL

Source: Internet
Author: User
Tags mysql manual
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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.