mariadb10.6.10啟動出現Please merge existing /var/db/mysql/my.cnf file with /usr/local/etc/mysql/conf.d/server.cnf
/usr/local/etc/rc.d/mysql-server: WARNING: failed precmd routine for mysql
請將原本設定在/var/db/mysql/my.cnf的設定和/usr/local/etc/mysql/conf.d/server.cnf和併,移除/var/db/mysql/my.cnf或改檔名。
就是把設定檔改到/usr/local/etc/mysql/conf.d/server.cnf。
/usr/local/etc/rc.d/mysql-server檔的預設值已經將cnf檔改至
/usr/local/etc/mysql/my.cnf
此檔會把/usr/local/etc/mysql/conf.d/下的檔案都include進來
須將socket = /var/run/mysql/mysql.sock改成socket = /tmp/mysql.sock
否則啟動時會出現錯誤
#
# This group is read both by the client and the server
# use it for options that affect everything, see
# https://mariadb.com/kb/en/configuring-mariadb-with-option-files/#option-groups
#
[client-server]
port = 3306
#socket = /var/run/mysql/mysql.sock [預設]
socket = /tmp/mysql.sock [修改成]
#
# include *.cnf from the config directory
#
!includedir /usr/local/etc/mysql/conf.d/