During maintenance, one day a customer sent me a website saying that the connection could not be reached. Then I checked that the database was too high, it is normal to delete some data, but it is also possible to delete some data without permissions. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~ ERROR 1045 (28000): Access denied for user 'sq8xxxxx' @ 'locahost' (using password: YES) www.2cto.com 1: open MYSQL Command Line Client in the beginning and enter your password [the one set during installation]
2: Enter "UPDATE mysql. user SET Password = OLD_PASSWORD ('Password')" after mysql> ')
3: enter WHERE Host = 'localhost' AND User = 'username' at the prompt-> AND press enter to prompt: Query OK, 0 rows affected (0.16 sec) Rows matched: 0 Changed: 0 Warnings: 0 4: Enter: flush privileges after mysql>; press enter to prompt: Query OK, 0 rows affected (0.19 sec) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~ Start the mysql service and log on to the mysql database. Run the following command: www.2cto.com [root @ localhost root] #/usr/bin/mysql-u sq8xxxx-p * (according to the lniux version compatibility issue, -p: the password of the database administrator sq8xxxx (usually the password)-p: Specifies the name of the database to be used, and then Enter password: enter the Database Password (redhat 9.0) in redhat 9.0. If you enter the database administrator's root password directly, the error 1045 will occur. the verification is stopped because the method provided above is troublesome during use. In fact, there is still a question about version compatibility. You can use myisamchk and service mysqld start in 9.0. Author: zhangzhengxing