1、到mysql官網下載安裝包,沒有賬號的需要注冊賬號登錄,然后雙擊下載安裝包,點擊接受協議
創新互聯公司長期為近1000家客戶提供的網站建設服務,團隊從業經驗10年,關注不同地域、不同群體,并針對不同對象提供差異化的產品和服務;打造開放共贏平臺,與合作伙伴共同營造健康的互聯網生態環境。為鎮巴企業提供專業的成都做網站、網站制作,鎮巴網站改版等技術服務。擁有10年豐富建站經驗和眾多成功案例,為您定制開發。
2、這里選擇默認安裝所有產品,當然也可以按照自己的需要選擇安裝,不過建議全部安裝
3、然后選擇安裝路徑,默認安裝到C盤,不建議,可以自己選擇安裝路徑和數據存儲目錄
4、檢查電腦配置是否符合安裝要求,直接點擊下一步,可能會有一個彈出框,直接點擊yes進入下一步
5、來到安裝界面,點擊execute執行安裝,這個過程可能有點慢,需要逐個安裝產品,完成之后,點擊下一步
6、產品確認,對你選擇安裝的所有產品展示,點擊下一步即可
7、跳轉到MySQL Server8.0.11安裝引導,一路下一步即可
8、設置登錄密碼,一定要牢記密碼,到最后一步,點擊Execute執行,等待所有產品檢查安裝完成,點擊finish完成
使用yum安裝mysql數據庫的軟件包 [root@xuegod63 ~]# yum -y install mariadb-server mariadb 。
注:? mariadb-server?? #MariaDB數據庫 mariadb? ? ? # MariaDB服務器Linux下客戶端 。
注:從centos7系統開始,系統中自帶的mysql數據庫變成了mariadb-server,mariadb-server和mysql操作上一樣。mariadb-server是mysql的一個分支。
啟動數據庫服務[root@xuegod63 ~]# systemctl start? mariadb? #啟動MariaDB服務。[root@xuegod63 ~]# systemctl enable? mariadb? #設置開啟自動啟動MariaDB服務。
安裝完mariadb-server后,運行mysql_secure_installation去除安全隱患,[root@xuegod63 ~]# mysql_secure_installation #進入安全配置導向。
NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MySQLSERVERS 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):?? #初次運行直接回車,因為root用戶沒有密碼。
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 #是否設置root用戶密碼,輸入Y。
New password: 123456?? #新密碼123456,Re-enter new password: 123456,Password updated successfully!Remove anonymous users? [Y/n] Y?? #是否刪除匿名用戶,生產環境建議刪除,所以直接回車或Y。
Success!Normally, root should only be allowed to connect from 'localhost'.? Thisensures that someone cannot guess at the root password from the network.Disallow root login remotely? [Y/n] Y? #是否禁止root遠程登錄,根據自己的需求選擇Y/n并回車建議禁止。
Success!By default, MariaDB comes with a database named 'test' that anyone canaccess.? This is also intended only for testing, and should be removedbefore moving into a production environment.Remove test database and access to it? [Y/n] Y?? #是否刪除test數據庫,直接回車或Y。
方法/步驟
1、下載安裝文件,安裝:雙擊Setup.exe文件,開始mysql的安裝。
2、點擊Next開始下一步安裝。默認是Typical,選擇Custom,因為Typical模式不允許改變安裝路徑,只能安裝在C盤
3、這里需要選擇組件和更改文件夾位置,組件可以默認的,位置要選擇Change來改變(注意:安裝mysql的路徑中,不能含有中文)
4、點擊Install開始安裝
5、安裝完成。