MySQL的安全問題從安裝開始說起
[root@localhost Desktop]# rpm -ivh MySQL-server-5.5.28-1.rhel5.i386.rpm
Preparing... ########################################### [100%]
1:MySQL-server ########################################### [100%]
PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
To do so, start the server, then issue the following commands:
/usr/bin/mysqladmin -u root password 'new-password'
/usr/bin/mysqladmin -u root -h localhost.localdomain password 'new-password'
Alternatively you can run:
/usr/bin/mysql_secure_installation
**對于這 2 種方式、我個人認為、mysql_secure_installation 比較好用***
which will also give you the option of removing the test
databases and anonymous user created by default. This is
strongly recommended for production servers.
**我覺得、這里的關(guān)鍵應(yīng)該是能夠把匿名用戶給刪掉***
See the manual for more instructions.
Please report any problems with the /usr/bin/mysqlbug script!
By default, a MySQL installation has an anonymous user, allowing anyone
to log into MySQL without having to have a user account created for
them. This is intended only for testing, and to make the installationgo a bit smoother.
You should remove them before moving into a production environment
**匿名用戶的危害****
所以、生產(chǎn)環(huán)境請務(wù)必刪之??!
我選擇 mysql_secure_installation
[root@localhost Desktop]# 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):
OK, successfully used password, moving on...
Setting the root password ensures that nobody can log into the MySQL
root user without the proper authorisation.
You already have a root password set, so you can safely answer 'n'.
Change the root password? [Y/n] n
... skipping.
By default, a MySQL installation has an anonymous user, allowing anyone
to log into MySQL without having to have a user account created for
them. This is intended only for testing, and to make the installation
go a bit smoother. You should remove them before moving into a
production environment.
Remove anonymous users? [Y/n] y
... Success!
Normally, root should only be allowed to connect from 'localhost'. This
ensures that someone cannot guess at the root password from the network.
Disallow root login remotely? [Y/n] n
... skipping.
By default, MySQL comes with a database named 'test' that anyone can
access. This is also intended only for testing, and should be removed
before moving into a production environment.
Remove test database and access to it? [Y/n] n
... skipping.
Reloading the privilege tables will ensure that all changes made so far
will take effect immediately.
Reload privilege tables now? [Y/n] y
... Success!
Cleaning up...
All done! If you've completed all of the above steps, your MySQL
installation should now be secure.
Thanks for using MySQL!
- MySQL全面安全加固實戰(zhàn)的全流程
- MySQL數(shù)據(jù)庫SSL安全連接方式
- MySQL性能監(jiān)控與安全管理的完整指南
- MySQL 用戶權(quán)限與安全管理最佳實踐
- 如何正確、安全地關(guān)閉MySQL
- MySQL用戶權(quán)限設(shè)置保護數(shù)據(jù)庫安全
- MySQL數(shù)據(jù)庫安全秘籍之守護數(shù)據(jù)金庫防火防盜防攻擊
- 如何優(yōu)雅安全的備份MySQL數(shù)據(jù)
- mysql 安全管理詳情
- 如何優(yōu)雅、安全的關(guān)閉MySQL進程
- 保障MySQL數(shù)據(jù)安全的一些建議
- MySQL 5.7 學(xué)習(xí)心得之安全相關(guān)特性
- MySQL安全策略(MySQL安全注意事項)
- 關(guān)于加強MYSQL安全的幾點建議
- 詳細講解安全升級MySQL的方法
- 淺析MySQL的注入安全問題
- MySQL數(shù)據(jù)庫安全設(shè)置與注意事項小結(jié)
- MySQL安全設(shè)置圖文教程
- 10個提高MySQL安全性的重要措施:從賬號管理到網(wǎng)絡(luò)防護,再到數(shù)據(jù)備份和版本更新
相關(guān)文章
Unity連接MySQL并讀取表格數(shù)據(jù)的實現(xiàn)代碼
本文給大家介紹Unity連接MySQL并讀取表格數(shù)據(jù)的實現(xiàn)代碼,實例化的同時調(diào)用MySqlConnection,傳入?yún)?shù),這里的傳入?yún)?shù)個人認為是CMD里面的直接輸入了,string格式直接類似手敲到cmd里面,完整代碼參考下本文2021-06-06
mysql Community Server 5.7.19安裝指南(詳細)
這篇文章主要介紹了mysql Community Server 5.7.19安裝指南(詳細),需要的朋友可以參考下2017-10-10
MySQL 中 DATE / DATETIME / TIME
在 MySQL 中,DATE、DATETIME、TIMESTAMP 都用來表示時間,但語義、存儲方式以及對時區(qū)的處理完全不同,本文就來詳細的介紹一下這三種的用法,感興趣的可以了解一下2026-02-02
mysql如何查找連續(xù)出現(xiàn)n次以上的數(shù)
這篇文章主要介紹了mysql如何查找連續(xù)出現(xiàn)n次以上的數(shù),具有很好的參考價值,希望對大家有所幫助。如有錯誤或未考慮完全的地方,望不吝賜教2022-05-05
MySQL8.0移除傳統(tǒng)的.frm文件原因及解讀
MySQL 8.0移除傳統(tǒng)的.frm文件,采用基于InnoDB的事務(wù)型數(shù)據(jù)字典,主要解決了元數(shù)據(jù)不一致、性能優(yōu)化、架構(gòu)簡化、增強功能支持、兼容性與升級問題,這一變革提高了數(shù)據(jù)庫的可靠性和性能,為未來的高級功能奠定了基礎(chǔ)2025-03-03
MySQL中配置文件my.cnf因權(quán)限問題導(dǎo)致無法啟動的解決方法
這篇文章主要給大家介紹了關(guān)于MySQL中配置文件my.cnf因權(quán)限問題導(dǎo)致無法啟動的解決方法,該無法啟動的錯誤提示代碼是:World-writable config file '/etc/my.cnf' is ignored,文中給出了詳細的解決方法,需要的朋友們下面來一起看看吧。2017-06-06
詳解MySQL存儲過程的創(chuàng)建和調(diào)用
這篇文章主要為大家介紹了MySQL存儲過程的創(chuàng)建和調(diào)用,具有一定的參考價值,感興趣的小伙伴們可以參考一下,希望能夠給你帶來幫助2021-12-12

