error 1045 (28000): access denied for user 'root'@'localhost' (using password: yes

created at 10-07-2021 views: 2
/etc/init.d/mysqld stop
mysqld_safe --user=mysql --skip-grant-tables --skip-networking &
update user set password=password('lihj@sz2019518') where user='root';
update user set authentication_string=password('lihj@sz2019518') where user='root';
flush privileges;
/etc/init.d/mysqld restart
mysql -u root  -p
Please log in to leave a comment.