最新文章專題視頻專題問答1問答10問答100問答1000問答2000關(guān)鍵字專題1關(guān)鍵字專題50關(guān)鍵字專題500關(guān)鍵字專題1500TAG最新視頻文章視頻文章20視頻文章30視頻文章40視頻文章50視頻文章60 視頻文章70視頻文章80視頻文章90視頻文章100視頻文章120視頻文章140 視頻2關(guān)鍵字專題關(guān)鍵字專題tag2tag3文章專題文章專題2文章索引1文章索引2文章索引3文章索引4文章索引5123456789101112131415文章專題3
問答文章1 問答文章501 問答文章1001 問答文章1501 問答文章2001 問答文章2501 問答文章3001 問答文章3501 問答文章4001 問答文章4501 問答文章5001 問答文章5501 問答文章6001 問答文章6501 問答文章7001 問答文章7501 問答文章8001 問答文章8501 問答文章9001 問答文章9501
當(dāng)前位置: 首頁 - 科技 - 知識百科 - 正文

mysql安裝包安裝教程

來源:懂視網(wǎng) 責(zé)編:小采 時間:2022-03-23 11:43:52
文檔

mysql安裝包安裝教程

mysql安裝首先使用yum安裝mysql數(shù)據(jù)庫的軟件包 ;然后啟動數(shù)據(jù)庫服務(wù)并運(yùn)行mysql_secure_installation去除安全隱患,最后登錄數(shù)據(jù)庫,完成安裝。
推薦度:
導(dǎo)讀mysql安裝首先使用yum安裝mysql數(shù)據(jù)庫的軟件包 ;然后啟動數(shù)據(jù)庫服務(wù)并運(yùn)行mysql_secure_installation去除安全隱患,最后登錄數(shù)據(jù)庫,完成安裝。

視頻內(nèi)容

產(chǎn)品型號:Thinkpad E15

系統(tǒng)版本:centos7

軟件版本:mysql 5.7

mysql安裝教程

1.使用yum安裝mysql數(shù)據(jù)庫的軟件包 

[root@xuegod63 ~]# yum -y install mariadb-server mariadb 

注:  

mariadb-server  #MariaDB數(shù)據(jù)庫 

mariadb      # MariaDB服務(wù)器Linux下客戶端 

注:從centos7系統(tǒng)開始,系統(tǒng)中自帶的mysql數(shù)據(jù)庫變成了mariadb-server,mariadb-server和mysql操作上一樣。mariadb-server是mysql的一個分支。

2.啟動數(shù)據(jù)庫服務(wù)

[root@xuegod63 ~]# systemctl start  mariadb #啟動MariaDB服務(wù)

[root@xuegod63 ~]# systemctl enable  mariadb #設(shè)置開啟自動啟動MariaDB服務(wù)

3. 安裝完mariadb-server后,運(yùn)行mysql_secure_installation去除安全隱患

[root@xuegod63 ~]# mysql_secure_installation #進(jìn)入安全配置導(dǎo)向

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):  #初次運(yùn)行直接回車,因?yàn)閞oot用戶沒有密碼

OK, successfully used password, moving on…

Setting the root password ensures that nobody can log into the MySQL

root user without the proper authorisation.

Set root password? [Y/n] Y #是否設(shè)置root用戶密碼,輸入Y

New password: 123456  #新密碼123456

Re-enter new password: 123456

Password updated successfully!

。。。

Remove anonymous users? [Y/n] Y  #是否刪除匿名用戶,生產(chǎn)環(huá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] Y #是否禁止root遠(yuǎn)程登錄,根據(jù)自己的需求選擇Y/n并回車,建議禁止

 ... Success!

By default, MariaDB 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] Y  #是否刪除test數(shù)據(jù)庫,直接回車或Y

 - Dropping test database...

 ... Success!

 - Removing privileges on test database...

 ... Success!

Reloading the privilege tables will ensure that all changes made so far

will take effect immediately.

Reload privilege tables now? [Y/n] Y  #是否重新加載權(quán)限表,直接回車

 ... Success!

Cleaning up...

All done!  If you've completed all of the above steps, your MariaDB

installation should now be secure.

Thanks for using MariaDB!

… Success!

至此數(shù)據(jù)庫安裝成功。

4. 登錄數(shù)據(jù)庫

[root@xuegod63 ~]# mysql -u root -p123456 

MariaDB [(none)]> show databases;    #沒有test數(shù)據(jù)庫 #執(zhí)行時,所有命令以;號結(jié)尾 

+-------------------------+ 

| Database

+-------------------------+ 

| information_schema

| mysql

| ucenter

+-------------------------+ 

3 rows in set (0.00 sec) 

MariaDB [(none)]> exit #退出命令可以加分號,也可以不加分號。

總結(jié):

1、使用yum安裝mysql數(shù)據(jù)庫的軟件包 

2、啟動數(shù)據(jù)庫服務(wù)

3、運(yùn)行mysql_secure_installation去除安全隱患

4、登錄數(shù)據(jù)庫

聲明:本網(wǎng)頁內(nèi)容旨在傳播知識,若有侵權(quán)等問題請及時與本網(wǎng)聯(lián)系,我們將在第一時間刪除處理。TEL:177 7030 7066 E-MAIL:11247931@qq.com

文檔

mysql安裝包安裝教程

mysql安裝首先使用yum安裝mysql數(shù)據(jù)庫的軟件包 ;然后啟動數(shù)據(jù)庫服務(wù)并運(yùn)行mysql_secure_installation去除安全隱患,最后登錄數(shù)據(jù)庫,完成安裝。
推薦度:
標(biāo)簽: 步驟 方法 安裝
  • 熱門焦點(diǎn)

最新推薦

猜你喜歡

熱門推薦

專題rhca培訓(xùn)多少錢rhca培訓(xùn)多少錢專題linux分區(qū)方法linux分區(qū)方法專題linux磁盤分區(qū)方法linux磁盤分區(qū)方法專題apache安裝方法apache安裝方法專題linux安裝nginx方法linux安裝nginx方法專題nginx負(fù)載均衡策略nginx負(fù)載均衡策略專題nginx負(fù)載均衡配置nginx負(fù)載均衡配置專題nginx配置文件詳解nginx配置文件詳解專題docker刪除鏡像的方法docker刪除鏡像的方法專題docker刪除容器的方法docker刪除容器的方法專題linux文件權(quán)限詳解linux文件權(quán)限詳解專題配置本地yum源配置本地yum源專題微信不退群又不想接收微信不退群又不想接收專題微信拍拍功能怎么給自己加文字微信拍拍功能怎么給自己加文字專題linux運(yùn)維報(bào)名流程linux運(yùn)維報(bào)名流程專題rhce報(bào)名步驟rhce報(bào)名步驟專題rhce報(bào)名流程rhce報(bào)名流程專題rhce怎么報(bào)名rhce怎么報(bào)名專題rhcsa報(bào)名步驟rhcsa報(bào)名步驟專題滲透測試培訓(xùn)什么內(nèi)容滲透測試培訓(xùn)什么內(nèi)容專題web安全培訓(xùn)什么內(nèi)容web安全培訓(xùn)什么內(nèi)容專題linux運(yùn)維日常工作內(nèi)容linux運(yùn)維日常工作內(nèi)容專題linux運(yùn)維工程師日常工作內(nèi)容linux運(yùn)維工程師日常工作內(nèi)容專題linux云計(jì)算運(yùn)維培訓(xùn)內(nèi)容linux云計(jì)算運(yùn)維培訓(xùn)內(nèi)容專題linux云計(jì)算運(yùn)維工程師培訓(xùn)內(nèi)容linux云計(jì)算運(yùn)維工程師培訓(xùn)內(nèi)容專題linux云計(jì)算培訓(xùn)哪些內(nèi)容linux云計(jì)算培訓(xùn)哪些內(nèi)容專題linux高級運(yùn)維工程師培訓(xùn)什么內(nèi)容linux高級運(yùn)維工程師培訓(xùn)什么內(nèi)容專題excel表格底色變綠色excel表格底色變綠色專題如何讓電腦不黑屏一直開著如何讓電腦不黑屏一直開著專題2021年屬什么生肖2021年屬什么生肖專題linux如何安裝mysql專題{{!value}}專題如何安裝mysql專題mysql創(chuàng)建數(shù)據(jù)表教程專題mysql創(chuàng)建表專題mysql菜鳥教程專題mysqlinstaller安裝教程專題rpm安裝mysql專題羋月是秦始皇什么人專題mysql專題羋月是秦始皇的什么專題linux怎么安裝mysql專題mysql增刪改查語句專題mysql怎么安裝專題怎么安裝mysql數(shù)據(jù)庫專題linux安裝mysql專題mysql安裝教程專題SQLServer2012安裝教程專題linux系統(tǒng)安裝mysql專題sqlserver2012安裝步驟教程專題
Top