After starting mysql, it prompts ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO). The solution to the inability to enter

After installing mysql, the execution fails and the following error message is reported:
Insert image description here

在vim /etc/my.cnf
skip-grant-tables

Insert image description here

After joining, restart mysql: systemctl restart mysqld

Guess you like

Origin blog.csdn.net/Lcongming/article/details/120291242