安裝完mysql-server 會提示可以運行mysql_secure_installation。運行mysql_secure_installation會執行幾個設置:
a)為root用戶設置密碼
b)刪除匿名賬號
c)取消root用戶遠程登錄
d)刪除test庫和對test庫的訪問權限
e)刷新授權表使修改生效
通過這幾項的設置能夠提高mysql庫的安全。建議生產環境中mysql安裝這完成后一定要運行一次mysql_secure_installation,詳細步驟請參看下面的命令:
[root@server1 ~]# mysql_secure_installation
NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MySQL
SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY!
In order to log into MySQL to secure it, we'll need the current
password for the root user. If you've just installed MySQL, and
you haven't set the root password yet, the password will be blank,
so you should just press enter here.
Enter current password for root (enter for none):
<
主站蜘蛛池模板:
昔阳县|
黄骅市|
城固县|
新蔡县|
枣庄市|
镇沅|
桃园县|
蓬莱市|
宣威市|
荃湾区|
平舆县|
松潘县|
基隆市|
湘西|
商南县|
博乐市|
尚义县|
师宗县|
永新县|
清新县|
宿松县|
黔江区|
三河市|
宜州市|
宁陵县|
海门市|
仙游县|
金乡县|
蒲江县|
米泉市|
金沙县|
射阳县|
乐陵市|
兴宁市|
慈利县|
洛南县|
滕州市|
金溪县|
大冶市|
连平县|
广元市|