我试图按照https://www.mkyong.com/mysql/where-does-mysql-stored-the-data-in-my-harddisk/上的说明操作。我在示例中找到了my.cnf
中的etc/mysql
文件,但令我惊讶的是它并不包含任何基本设置,只有以下内容:
# Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; version 2 of the License.
#
# 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 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
!includedir /etc/mysql/conf.d/
!includedir /etc/mysql/mysql.conf.d/
我还希望使用user =
,datadir =
等行。是不是MySQL设置不正确?
答案 0 :(得分:0)
在Marc B发表评论之后,我做了一些搜索,发现在Askubuntu上回答了同样的问题:https://askubuntu.com/questions/699903/why-etc-mysql-my-cnf-is-empty。
重申一下,includedir
行表示可以在列出的目录中找到其他配置文件(在这种情况下为.cnf)。