2003无法连接到IP上的MYSQL服务器(10061“未知错误”)

雨中笑 mysql 601热度

简介Job for mysqld.service failed because the control process exited with error code. See "systemctl status mysqld.service" and "journalctl -xe" for details.

今天突然发现网站出现问题了,连接数据库出现10061“未知错误”,

立刻到服务器上重启Mysql   ,systemctl start mysqld


提示:

Job for mysqld.service failed because the control process exited with error code. See "systemctl status mysqld.service" and "journalctl -xe" for details.

然后杀进程重启还是提示 Job for..., 后面根据systemctl status mysqld.service,journalctl -xe去查


根据提示没有找到解决的方法

然后直接看日志 tail -100f /var/log/mysqld.log


发现有个警告

[Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).

只需更改配置  vi /etc/my.cn   添加  explicit_defaults_for_timestamp=true


# For advice on how to change settings please see
# http://dev.mysql.com/doc/refman/5.7/en/server-configuration-defaults.html

[mysqld]
#skip-grant-tables
#
# Remove leading # and set to the amount of RAM for the most important data
# cache in MySQL. Start at 70% of total RAM for 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

explicit_defaults_for_timestamp=true

再重启就解决了  systemctl start mysqld


很赞哦!(3)

本文阅读量 2125发布于 2020年5月26日

您的访问IP 3.149.244.86最早于 2024年5月15日 1时31分55秒 阅读过本文 为本文提供了 1 热度 1 阅读量

文章评论
回帖