mysql安裝教程視頻
產品型號:Thinkpad E15
系統版本:centos7
軟件版本:mysql 5.7
mysql安裝教程
1.使用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的一個分支。
2.啓動數據庫服務
[root@xuegod63 ~]# systemctl start mariadb #啓動MariaDB服務
[root@xuegod63 ~]# systemctl enable mariadb #設定開啓自動啓動MariaDB服務
3. 安裝完mariadb-server後,執行mysql_secure_installation去除安全隱患
[root@xuegod63 ~]# 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): #初次執行直接回車,因爲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'. This
ensures 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 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數據庫,直接回車或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 #是否重新加載權限表,直接回車
... 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!
至此數據庫安裝成功。
4. 登入數據庫
[root@xuegod63 ~]# mysql -u root -p123456
MariaDB [(none)]> show databases; #沒有test數據庫 #執行時,所有命令以;號結尾
+-------------------------+
| Database|
+-------------------------+
| information_schema|
| mysql|
| ucenter |
+-------------------------+
3 rows in set (0.00 sec)
MariaDB [(none)]> exit #退出命令可以加分號,也可以不加分號。
總結:
1、使用yum安裝mysql數據庫的軟件包
2、啓動數據庫服務
3、執行mysql_secure_installation去除安全隱患
4、登入數據庫
-
攝像頭怎麼連接手機,一文讓你秒懂
1、攝像頭用網線連上路由器,通電,電腦也連接在同一路由並安裝客戶端軟件。2、用攝像頭的搜尋工具搜尋到攝像頭IP,把該IP改成與路由器同一網段儲存。之後在IE欄輸入該攝像頭IP進入WEB端介面進行簡單設定。3、進入路由進行端口映射,若攝像頭是P2P功能的,此步可以省略...
-
微博怎麼取消手機型號
1、點擊設定圖標:首先需要開啟手機上的微博軟件,在微博我的頁面裏點擊設定圖標。2、點擊會員專屬設定:然後在手機微博設定裏,找到並點擊會員專屬設定。3、點擊微博來源:然後在會員專屬設定頁面,找到個性設定裏的微博來源。4、點擊不顯示:最後在微博來源設定頁面中,設定...
-
蘋果手機相冊怎麼上鎖,蘋果手機相冊怎樣上鎖
1、在手機上下載騰訊手機管家APP,下載完畢點擊開啟。2、進入手機管家後,選擇相冊管理。3、點擊加密相冊並進入。4、第一次進入加密相冊會要設定一個個人密碼,或者用戶可以透過指紋識別進入相冊。5、輸入密碼後,密碼如果正確,相冊會自動開啟。6、進入相冊後,點擊添加,...
-
黑色背景拍照竅門詳解
1、調整拍攝角度,尋找背景:既然是拍攝黑背景,在拍攝前我們儘量選擇深色的背景,這樣也就更加容易達到效果。不過深色不一定要是純黑色,只要顏色較爲深沉,偏向暗色調的均可。拍攝前多多觀察,尋找不同的拍攝角度,以找到有反差的深色作爲背景。要多嘗試不同的角度,直至主體...