為什麼 MySQLd 不載入 cnf 檔?

為什麼 MySQLd 不載入 cnf 檔?

我最近在 Ubuntu 18.04 上使用 MySQL 5.7.33 安裝了一個測試 mysql 伺服器實例。當伺服器啟動時,它使用預設值而不是正確的 cnf 檔案。

root@host2:~# mysql --help | grep "Default options" -A 1 
Default options are read from the following files in the given order:
/etc/my.cnf /etc/mysql/my.cnf ~/.my.cnf 

/etc/my.cnf 是有效文件並且具有適當的權限。

我也嘗試過這個,谷歌說會顯示已加載的 cnf,但沒有。

root@host2:~# ps aux | grep mysql
mysql      1010  0.4  5.2 1600976 207244 ?      Sl   10:19   0:00 /usr/sbin/mysqld --daemonize --pid-file=/run/mysqld/mysqld.pid

我不知道下一步該做什麼。

答案1

解決方案在這篇文章中,至少是正在加載的配置的連結... 為什麼 /etc/mysql/my.cnf 是空的?

相關內容