MySQL database software is actually green and can continue to be used after reloading the system.
1, reinstall the system to keep the original after the MySQL installation folder, Data folder.
2. Make a batch file to start MySQL: "Run.bat" files are stored under the MySQL installation folder bin.
Mysqld.exe--defaults-file=. /my-default.ini--console
3, run Run.bat can.
Assume the following error occurred while connecting to the database: "Access denied for user ' root ' @ ' IP '"
1. Admin login system, stop MySQL service or end mysqld process
2. Go to the command line and come to the MySQL installation folder. If the installation folder is d:\mysql\, cmd goes to the command line
3. Perform d:\mysql\bin\mysqld-nt--skip-grant-tables start MySQL, turn off check of permissions
4. Perform d:\mysql\bin\mysqladmin-u root flush-privileges password "newpassword" Reset root password
5. Start MySQL service again
Linux systems can be used in the following ways:
Method One:
#/etc/init.d/mysql stop
# mysqld_safe--user=mysql--skip-grant-tables-- Skip-networking &
# mysql-u root mysql
mysql> UPDATE user SET Password=password (' NewPassword ') where user= ' root ';
mysql> FLUSH privileges;
mysql> quit
#/etc/init.d/mysql restart
# mysql-uroot-p
Enter Password: < Enter the new password newpassword>
mysql>
Method Two:
Direct Use/etc/mysql/ Username and password: provided in the [Client] section of the debian.cnf file;
# mysql-udebian-sys-maint-p
Enter Password: < Enter the password > for the [client] section;
mysql> UPDATE user SET Password=password (' NewPassword ') where user = ' root ';
mysql> FLUSH privileges;
mysql> quit
# mysql-uroot-p &NBSP;&NBSP
Enter Password: < Enter the newly created password newpassword>
mysql>
Copyright notice: This article Bo Master original articles, blogs, without consent may not be reproduced.
[MySQL] refresh after Windows Recovery MySQL and " Access denied for user& #39;root& #39;@& #39;ip& #39;" Handling issues