Home >Operation and Maintenance >Linux Operation and Maintenance >What to do if linux mysqld cannot start
Solution to the problem that linux mysqld cannot start: 1. Install mysql through the "yum install mysql-server" command; 2. Open "my.cnf", and then add a line "skip-" under "[mysqld]" grant-tables"; 3. Restart mysql through "systemctl restart mysqld".
The operating environment of this tutorial: linux5.9.8 system, mysql version 5.7, DELL G3 computer
What to do if linux mysqld cannot start ?
Common solutions to mysql installation failure and startup failure in Linux
systemctl start mysqld.service
find / -name mysql
Then use yum to install mysql
yum install mysql-serverThe following problems occur during installation. GPG security issues: Add --nogpgcheck after the yum install xxxx command to skip the public key check installation, solve the problem, and the installation is successful!
cat /var/log/mysqld.log | grep 'root@localhost:'2.2 Find this line of log, password: a#sE2lVHzzvV
2022-05-13T02:35:13.846556Z 1 [Note] A temporary password is generated for root@localhost: a#sE2lVHzzvV
If the connection is still refused, try skipping the password to enter: enter vim /etc/my.cnf and add a line under [mysqld]skip-grant -tables is used to skip the password verification process, and then restart mysql
systemctl restart mysqld, and then enter the command
mysql to enter. After changing the password, you can remove this line Configure and then reboot.
flush privileges; alter user root@localhost identified by '1234';2.4 An error occurs (the password is too simple
ERROR 1819 (HY000): Your password does not satisfy the current policy requirementsRe-change the password to: Han123…
alter user root@localhost identified by 'Han123..' # mysql5.7 ,若失败可以将root@localhost替换root@%试试 ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'Han123..'; # mysql8.0,若失败可以将'root'@'localhost'替换'root'@'%'试试Recommended study: "Linux Video Tutorial"
The above is the detailed content of What to do if linux mysqld cannot start. For more information, please follow other related articles on the PHP Chinese website!