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 種方式、我個人認(rèn)為、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數(shù)據(jù)庫需要注意的安全知識
- MySQL安全設(shè)置圖文教程
- MySQL數(shù)據(jù)庫安全配置介紹
- Win2003服務(wù)器安裝及設(shè)置教程 MySQL安全設(shè)置圖文教程
- MySQL數(shù)據(jù)庫安全設(shè)置與注意事項(xiàng)小結(jié)
- MySQL數(shù)據(jù)庫安全之防止撰改的方法
- MySQL數(shù)據(jù)庫中的安全設(shè)置方案
- 淺析MySQL的注入安全問題
- Ubuntu上安裝MySQL+問題處理+安全優(yōu)化
- 關(guān)于加強(qiáng)MYSQL安全的幾點(diǎn)建議
- MySQL安全策略(MySQL安全注意事項(xiàng))
相關(guān)文章
MySQL中二進(jìn)制與重做日志文件的基本概念學(xué)習(xí)教程
這篇文章主要介紹了MySQL中二進(jìn)制日志文件與重做日志文件的基本概念學(xué)習(xí)教程,講到了一些重做日志與二進(jìn)制日志的區(qū)別,需要的朋友可以參考下2015-11-11
mysql如何利用Navicat導(dǎo)出和導(dǎo)入數(shù)據(jù)庫的方法
這篇文章主要介紹了mysql如何利用Navicat導(dǎo)出和導(dǎo)入數(shù)據(jù)庫的方法,小編覺得挺不錯的,現(xiàn)在分享給大家,也給大家做個參考。一起跟隨小編過來看看吧2019-02-02
最新Navicat?15?for?MySQL破解+教程?正確破解步驟
Navicat?for?MySQL是一個針對MySQL數(shù)據(jù)庫而開發(fā)的第三方mysql管理工具,該軟件可以用于?MySQL?數(shù)據(jù)庫服務(wù)器版本?3.21?或以上的和?MariaDB?5.1?或以上,這篇文章主要介紹了最新Navicat?15?for?MySQL破解+教程?正確破解步驟,需要的朋友可以參考下2023-04-04
windows server 2008 64位MySQL5.6免安裝版本配置方法圖解
這篇文章主要介紹了windows server 2008 64位MySQL5.6免安裝版本配置方法圖解,需要的朋友可以參考下2017-08-08
Mysql在項(xiàng)目中相關(guān)使用方法指南(簡單操作數(shù)據(jù)庫)
作為一名編程人員,對MySQL一定不會陌生,尤其是互聯(lián)網(wǎng)行業(yè),對MySQL的使用是比較多的,下面這篇文章主要給大家介紹了關(guān)于Mysql在項(xiàng)目中相關(guān)使用方法的相關(guān)資料,主要是簡單操作數(shù)據(jù)庫,需要的朋友可以參考下2022-08-08
MySQL優(yōu)化案例之隱式字符編碼轉(zhuǎn)換
這篇文章主要介紹了MySQL優(yōu)化案例之隱式字符編碼轉(zhuǎn)換,隱式類型轉(zhuǎn)換也會導(dǎo)致同樣的放棄走樹搜索,更多相關(guān)內(nèi)容具有一定的參考價值,需要的朋友可以參考一下2022-07-07

