前不久对服务器做了些补丁修复,近期在使用时发现无法访问数据库了。
在服务器中执行启动服务操作,结果报错
[root@InterFinance01 ~]# service mysqld start
初始化 MySQL 数据库: mysqld: Can't create directory '/data/mysql/mysqldata/' (Errcode: 2 - No such file or directory)
2020-10-21T01:08:55.927674Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2020-10-21T01:08:55.927720Z 0 [Warning] 'NO_ZERO_DATE', 'NO_ZERO_IN_DATE' and 'ERROR_FOR_DIVISION_BY_ZERO' sql modes should be used with strict mode. They will be merged with strict mode in a future release.
2020-10-21T01:08:55.929500Z 0 [ERROR] Aborting
查询半天,发现在系统中只有一个my.cnf 文件,在etc路径下,修改了datadir设置,结果还报同样的错误。
在data路径下建立mysql目录,然后在mysql目录下建立了mysq