mysql - 来自 aws ec2 的文件 /etc/mysql/mysql.conf.d 不存在
问题描述
除此之外,我试图在 aws ec2 中找到类似标题的文件,但它不存在。我想我在不知情的情况下删除了它。当文件不存在时,还有其他解决方案吗?重新安装被认为是最后的手段。
解决方案
我觉得你是男人,我真的很讨厌成为那个人,但这就是我们需要备份的原因。话虽如此,您可以手动重新创建目录并添加一个mysql.cnf
内部。通常,它只包含 mysql 配置的占位符部分以及一些许可证文本。
# Copyright (c) 2015, 2021, Oracle and/or its affiliates.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License, version 2.0,
# as published by the Free Software Foundation.
#
# This program is also distributed with certain software (including
# but not limited to OpenSSL) that is licensed under separate terms,
# as designated in a particular file or component or in included license
# documentation. The authors of MySQL hereby grant you an additional
# permission to link the program and your derivative works with the
# separately licensed software that they have included with MySQL.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License, version 2.0, for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#
# The MySQL Client configuration file.
#
# For explanations see
# http://dev.mysql.com/doc/mysql/en/server-system-variables.html
[mysql]
我不知道您的配置文件中还有什么,但如果您有自定义设置,您也可以手动添加它们。
通常还有一个mysqldump.cnf
里面conf.d
有以下内容
[mysqldump]
quick
quote-names
max_allowed_packet = 16M
推荐阅读
- javascript - React-mapbox gl 在无状态功能组件中访问 Map 的“缩放”
- angular - 如何在角度谷歌地图上设置 Spiderfier Marker 的图标
- powershell - 如果我从文件中包含代码,则看不到代码
- sbt - 如何配置、禁用或覆盖 sbt SecurityManager?
- python - settings 没有属性 blit
- ios - 如何在swift中将可访问性标题添加到新视图
- sql - 在条件发生的最大日期加入两个表
- c# - 将文本框中的字符串添加到数组
- r - 在R中将exif数据写回jpeg
- dialogflow-es - 如何从对话流(GCP)连接外部数据库