簡體   English   中英

mysql 服務器無法識別 my.cnf 中的更改

[英]mysql server doesn't recognize changes in my.cnf

I have installed mysql server and mysql client with bundle in Centos 7. mysql server's port is displayed as 0. I want to give specific port to it. 為此,我已將/etc/my.cnf更改為以下內容;

port=4545

更改后,我重新啟動了服務。 但它是從作為 ON 的跳過網絡開始的。 我也嘗試將 skip-networking 更改為 OFF 但沒有完成。

更改后我也嘗試了 mysql_secure_installation 但出現以下錯誤:

失敗:錯誤:MySQL 服務器正在使用 --skip-grant-tables 選項運行,因此無法執行此語句

我該如何解決這個問題? 謝謝回答

我已經用下面的方法解決了我的問題;

systemctl stop mysqld
systemctl daemon-reload
systemctl set-environment MYSQLD_OPTS="--skip-networking=OFF"

在此之后,我再次開始服務。

systemctl start mysqld

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM