mysqld.service 的作业失败请参阅“systemctl status mysqld.service”

mysqld.service 的作业失败请参阅“systemctl status mysqld.service”

<p>控制台说</p> <pre><code class="lang-">[root@ip-172-31-18-2 mysql]# service mysqld start Starting mysqld (via systemctl): Job for mysqld.service failed because the control process exited with an error code. See &quot;systemctl status mysqld.service&quot; and &quot;journalctl -xe&quot; for details. </code></pre> <p>mysqld.service</p> <pre><code class="lang-">root@ip-172-31-18-2 mysql]# systemctl status mysqld.service ● mysqld.service - SYSV: MySQL database server. Loaded: loaded (/etc/rc.d/init.d/mysqld) Active: failed (Result: exit-code) since Sat 2017-02-18 20:59:17 IST; 36s ago Docs: man:systemd-sysv-generator(8) Process: 9925 ExecStart=/etc/rc.d/init.d/mysqld start (code=exited, status=1/FAILURE) Feb 18 20:59:16 ip-172-31-18-2.ap-southeast-1.compute.internal systemd[1]: Starting SYSV: MySQL database server.... Feb 18 20:59:17 ip-172-31-18-2.ap-southeast-1.compute.internal mysqld[9925]: MySQL Daemon failed to start. Feb 18 20:59:17 ip-172-31-18-2.ap-southeast-1.compute.internal mysqld[9925]: Starting mysqld: [FAILED] Feb 18 20:59:17 ip-172-31-18-2.ap-southeast-1.compute.internal systemd[1]: mysqld.service: control process exited, code=exited status=1 Feb 18 20:59:17 ip-172-31-18-2.ap-southeast-1.compute.internal systemd[1]: Failed to start SYSV: MySQL database server.. Feb 18 20:59:17 ip-172-31-18-2.ap-southeast-1.compute.internal systemd[1]: Unit mysqld.service entered failed state. Feb 18 20:59:17 ip-172-31-18-2.ap-southeast-1.compute.internal systemd[1]: mysqld.service failed. </code></pre> <p>控制台说</p> <p>[root@ip-172-31-18-2 mysql]# service mysqld start<br /> Starting mysqld (via systemctl): Job for mysqld.service failed because the control process exited with an error code. See “systemctl status mysqld.service” and “journalctl -xe” for details.<br /> mysqld.service</p> <p>[root@ip-172-31-18-2 mysql]# systemctl status mysqld.service<br /> ● mysqld.service - SYSV: MySQL database server.<br /> Loaded: loaded (/etc/rc.d/init.d/mysqld)<br /> Active: failed (Result: exit-code) since Sat 2017-02-18 20:59:17 IST; 36s ago<br /> Docs: man:systemd-sysv-generator(8)<br /> Process: 9925 ExecStart=/etc/rc.d/init.d/mysqld start (code=exited, status=1/FAILURE)</p> <p>Feb 18 20:59:16 ip-172-31-18-2.ap-southeast-1.compute.internal systemd[1]: Starting SYSV: MySQL database server…<br /> Feb 18 20:59:17 ip-172-31-18-2.ap-southeast-1.compute.internal mysqld[9925]: MySQL Daemon failed to start.<br /> Feb 18 20:59:17 ip-172-31-18-2.ap-southeast-1.compute.internal mysqld[9925]: Starting mysqld: [FAILED]<br /> Feb 18 20:59:17 ip-172-31-18-2.ap-southeast-1.compute.internal systemd[1]: mysqld.service: control process exited, code=exited status=1<br /> Feb 18 20:59:17 ip-172-31-18-2.ap-southeast-1.compute.internal systemd[1]: Failed to start SYSV: MySQL database server…<br /> Feb 18 20:59:17 ip-172-31-18-2.ap-southeast-1.compute.internal systemd[1]: Unit mysqld.service entered failed state.<br /> Feb 18 20:59:17 ip-172-31-18-2.ap-southeast-1.compute.internal systemd[1]: mysqld.service failed.<br /> 到目前为止,我一直在尝试:</p> <pre><code class="lang-">mysqld_safe --defaults-file=/etc/my.cf chown -R mysql:mysql /var/lib/mysql /etc/init.d/mysqld start /etc/init.d/mysqld stop systemctl restart systemd-logind </code></pre> <p>已重新启动服务器</p> <p>仍然没有运气。</p> <p>my.cnf 文件</p> <pre><code class="lang-"># For advice on how to change settings please see # http://dev.mysql.com/doc/refman/5.7/en/server-configuration-defaults.html [mysqld] # # Remove leading # and set to the amount of RAM for the most important data # cache in MySQL. Start at 70% of total RAM for a dedicated server, else 10%. # innodb_buffer_pool_size = 128M # # Remove leading # to turn on a very important data integrity option: logging # changes to the binary log between backups. # log_bin # # Remove leading # to set options mainly useful for reporting servers. # The server defaults are faster for transactions and fast SELECTs. # Adjust sizes as needed, experiment to find the optimal values. # join_buffer_size = 128M # sort_buffer_size = 2M # read_rnd_buffer_size = 2M datadir=/var/lib/mysql socket=/var/lib/mysql/mysql.sock # Disabling symbolic-links is recommended to prevent assorted security risks symbolic-links=0 log-error=/var/log/mysqld.log pid-file=/var/run/mysqld/mysqld.pid </code></pre>
mysqld.service 的作业失败请参阅“systemctl status mysqld.service” 2022-09-19 10:51:50
mysqld.service 的作业失败请参阅“systemctl status mysqld.service” 0
mysqld.service 的作业失败请参阅“systemctl status mysqld.service”
<p>这非常有效。</p> <pre><code class="lang-">/etc/init.d/mysql stop service mysql stop killall -KILL mysql mysqld_safe mysqld /etc/init.d/mysql start service mysql start </code></pre>