iT邦幫忙

0

[發問]請問如何確保mariadb服務關閉時所有交易都已完成

目前只知道執行「mysqladmin -uroot -p shutdonw」指令就可以將mariadb服務關閉,但問題是如何確保所有交易都已完成?或是確保都已經沒有任何連線?

圖片
  直播研討會
圖片
{{ item.channelVendor }} {{ item.webinarstarted }} |
{{ formatDate(item.duration) }}
直播中

1 個回答

9
一級屠豬士
iT邦大師 1 級 ‧ 2014-03-03 14:53:49
最佳解答

看連線

mysqladmin -u root -p processlist

是否無法增加關閉的參數,讓mariadb自己判斷均無交易(或交易均成功)後,自動關閉?

MySQL官方文件,裡面有說到MySQL Shutdown會作的動作順序.
http://dev.mysql.com/doc/refman/5.6/en/server-shutdown.html

1.The shutdown process is initiated.
2.The server creates a shutdown thread if necessary.
3.The server stops accepting new connections.
4.The server terminates current activity.
5.The server shuts down or closes storage engines.
6.The server exits.

我要發表回答

立即登入回答