docker部署mysql8.0启动失败
docker logs mysql查看日志1、情况一(‘STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION’ to ‘sql_mode’.)ERROR: mysqld failed while attempting to check configcommand wa...
·
docker logs mysql查看日志
1、情况一(‘STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION’ to ‘sql_mode’.)
ERROR: mysqld failed while attempting to check config
command was: "mysqld --verbose --help"
2020-03-13T09:35:44.881652Z 0 [ERROR] [MY-000077] [Server] /usr/sbin/mysqld: Error while setting value 'STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' to 'sql_mode'.
修改my.cnf
MYSQL8以上已经取消了NO_AUTO_CREATE_USER,sql_mode中不能包含这个。
sql_mode=ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION
2、情况二(mysqld: Error on realpath() on ‘/var/lib/mysql-files’ (Error 2 - No such file or directory)
2020-03-13T09:38:21.821848Z 0 [ERROR] [MY-010095] [Server] Failed to access directory for --secure-file-priv. Please make sure that directory exists and is accessible by MySQL Server. Supplied value : /var/lib/mysql-files
2020-03-13T09:38:21.824249Z 0 [ERROR] [MY-010119] [Server] Aborting
Initializing database
)
windows下:修改my.ini 在[mysqld]内加入secure_file_priv=/var/lib/mysql
linux下:修改my.cnf 在[mysqld]内加入secure_file_priv=/var/lib/mysql
更多推荐
已为社区贡献1条内容
所有评论(0)