rpm 安裝1.下載安裝包并解壓安裝
點擊下載rpm包→阿里云盤分享(本次使用的是mysql5.7.29的安裝包)
tar xzvf mysql.tar.gz#卸載本地的mariadb、mysqlrpm -qa | grep -i -E mariadb|mysql | xargs -n1 rpm -e --nodeps rpm -ivh 01_mysql-community-common-5.7.29-1.el7.x86_64.rpm rpm -ivh 02_mysql-community-libs-5.7.29-1.el7.x86_64.rpm rpm -ivh 03_mysql-community-libs-compat-5.7.29-1.el7.x86_64.rpm rpm -ivh 04_mysql-community-client-5.7.29-1.el7.x86_64.rpm rpm -ivh 05_mysql-community-rver-5.7.29-1.el7.x86_64.rpm --force --nodeps systemctl start mysqld && systemctl enable mysqld.rvice2.查詢數據庫初始密碼
grep "temporary password is generated" /var/log/mysqld.log
3.初始化數據庫mysql_cure_installation
4.進行數據庫密碼和安全設置Securing the MySQL rver deployment.Enter password for ur root: #輸入第四步獲取的密碼The existing password for the ur account root has expired. Plea t a new password.New password: #設置新密碼Re-enter new password: #再輸入一遍#密碼一般需要大小寫數字+特殊符號Estimated strength of the password: 100 Do you wish to continue with the password provided?(Press y|Y for Yes, any other key for No) : y #是否更改密碼 yBy default, a MySQL installation has an anonymous ur,allowing anyone to log into MySQL without having to havea ur account created for them. This is intended only fortesting, and to make the installation go a bit smoother.You should remove them before moving into a productionenvironment.Remove anonymous urs? (Press y|Y for Yes, any other key for No) : #是否刪除匿名用戶?按y | y表示是,按任何其他鍵表示否,這里我直接跳過... skipping.Normally, root should only be allowed to connect from'localhost'. This ensures that someone cannot guess atthe root password from the network.Disallow root login remotely? (Press y|Y for Yes, any other key for No) : #是否禁用root用戶遠程登錄,根據自己的需求選擇Y/n并回車,我這里選擇允許所以直接跳過... skipping.By default, MySQL comes with a databa named 'test' thatanyone can access. This is also intended only for testing,and should be removed before moving into a productionenvironment.Remove test databa and access to it? (Press y|Y for Yes, any other key for No) : #是否刪除test數據庫,直接回車... skipping.Reloading the privilege tables will ensure that all changesmade so far will take effect immediately.Reload privilege tables now? (Press y|Y for Yes, any other key for No) : #是否重新加載權限表,直接回車... skipping.All done!
本文發布于:2023-02-28 20:14:00,感謝您對本站的認可!
本文鏈接:http://www.newhan.cn/zhishi/a/167766496679624.html
版權聲明:本站內容均來自互聯網,僅供演示用,請勿用于商業和其他非法用途。如果侵犯了您的權益請與我們聯系,我們將在24小時內刪除。
本文word下載地址:rpm 安裝(rpm 安裝yum).doc
本文 PDF 下載地址:rpm 安裝(rpm 安裝yum).pdf
| 留言與評論(共有 0 條評論) |