如果您正在使用archlinux
它,了解包管理器 ( pacman
) 是一个重要的想法。关于/etc/my.cfg
你可以运行的问题
pacman -Ql mariadb
在那里你会看到该文件实际上被调用:
/etc/mysql/my.cnf
Arch linux不会为您配置软件包,这是arch 哲学的一部分。它将提供示例配置,甚至为您提供一个systemd
单元文件
usr/lib/systemd/system/mysqld.service
但是您有责任确保配置正确并实际启动守护程序。
systemctl enable mysqld # add the unit file to the boot sequence
systemctl start mysqld # runs ExecStart= in the unit file
systemctl stop mysqld # kills the daemon
systemctl disable mysqld # remove unit from boot sequence
重新安装
由于重新安装这个词出现在问题的标题中,因此有人可能会发现这个问题:要重新安装mariadb
,您只需执行
pacman -S mariadb
pacman
将重新安装已经安装的包,不需要删除包(为了完整性,包删除发生在pacman -R
)