《MYSQL教程mysql誤刪root用戶恢復方法》要點:
本文介紹了MYSQL教程mysql誤刪root用戶恢復方法,希望對您有用。如果有疑問,可以聯(lián)系我們。
MYSQL教程裝完數(shù)據(jù)庫清理一些默認賬號的時候不小心把root刪除了,flush privileges 之后的新 root 忘了grant任何權(quán)限,查看mysqld選項里面有個 ??skip-grant-tables
MYSQL教程mysql5.5手冊說明如下
MYSQL教程This option causes the server to start without using the privilege system at all, which gives anyone with access to the server unrestricted access to all databases. You can cause a running server to start using the grant tables again by executing mysqladmin flush-privileges or mysqladmin reload command from a system shell, or by issuing a MySQL FLUSH PRIVILEGES statement after connecting to the server. This option also suppresses loading of plugins, user-defined functions (UDFs), and scheduled events. To cause plugins to be loaded anyway, use the --plugin-load option.
MYSQL教程--skip-grant-tables is unavailable if MySQL was configured with the --disable-grant-options option. See Section 2.10.2, “Typical configure Options”.
MYSQL教程mysqld_safe是Unix/Linux系統(tǒng)下的MySQL服務器的一個啟動腳本.這個腳本增加了一些平安特性,會在啟動MySQL服務器以后繼續(xù)監(jiān)控其運行情況,并在出現(xiàn)錯誤的時候重新啟動服務器.后臺啟動mysql
MYSQL教程如果沒有root賬戶就添加一個
MYSQL教程直接輸入mysql連接并添加權(quán)限,這時候是不能使用grant命令的,只能用update
MYSQL教程注意我用的是mysql是5.5版本,可能操作過程中sql語句或其他地方有不同,語句執(zhí)行完畢之后必要flush privileges ,還可能要重新登錄才行.
維易PHP培訓學院每天發(fā)布《MYSQL教程mysql誤刪root用戶恢復方法》等實戰(zhàn)技能,PHP、MYSQL、LINUX、APP、JS,CSS全面培養(yǎng)人才。
轉(zhuǎn)載請注明本頁網(wǎng)址:
http://www.snjht.com/jiaocheng/9519.html