Centos6.7系统环境下使用 yum install 安装mysql-community-5.7.22(史上最简)
生活随笔
收集整理的這篇文章主要介紹了
Centos6.7系统环境下使用 yum install 安装mysql-community-5.7.22(史上最简)
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
在運維或者開發過程中,經常會遇見部署各類LNMP或者LAMP模式的系統運行架構,尤其再部署數據庫時,往往有人對數據庫使用過程倒是很多,但從頭部署的情況少有發生,今天推薦一種簡單的mysql安裝操作:這簡單是真正的簡單
?
簡單的解決方案:
?
1、yum源安裝
#yum install #下載及安裝yum源 #yum clean all #清理yum #yum makecache #重新緩存 #yum install mysql-community-server #yum安裝 就這么簡單2、開啟服務
#/etc/init.d/mysqld3、查找初始密碼并修改
#grep 'temporary password' /var/log/mysqld.log #唯一不同的就是此處,安裝完成后會有一個初始密碼放置到log中,進行初始登錄 # grep 'temporary password' /var/log/mysqld.log 2018-07-27T11:00:07.016171Z 1 [Note] A temporary password is generated for root@localhost: xxxxx # mysql -uroot -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 4 Server version: 5.7.22 Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> #強制修改密碼,否則無法使用。 mysql> show databases; ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement. mysql> set password=password('test123'); #密碼復雜度要求。 ERROR 1819 (HY000): Your password does not satisfy the current policy requirements #復雜度提高后成功。 mysql> set password=password('Test@!234'); Query OK, 0 rows affected, 1 warning (0.00 sec)4、yum安裝過程中的會出現依賴程序問題,只需要先安裝一下依賴即可
#yum install mysql-devel通過以上簡單安裝步驟即可完成一鍵部署操作(需要整理方可成一鍵)
?
在運維或者開發過程中,經常會遇見部署各類LNMP或者LAMP模式的系統運行架構,尤其再部署數據庫時,往往有人對數據庫使用過程倒是很多,但從頭部署的情況少有發生,今天推薦一種簡單的mysql安裝操作:這簡單是真正的簡單
簡單的解決方案:
1、yum源安裝
| 1 2 3 4 | #yum?install???#下載及安裝yum源? #yum?clean?all????????????????????????????#清理yum #yum?makecache????????????????????????????#重新緩存 #yum?install?mysql-community-server???????#yum安裝?就這么簡單 |
2、開啟服務
| 1 | #/etc/init.d/mysqld |
4、查找初始密碼并修改
?
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | #grep?'temporary?password'?/var/log/mysqld.log???#唯一不同的就是此處,安裝完成后會有一個初始密碼放置到log中,進行初始登錄 #?grep?'temporary?password'?/var/log/mysqld.log 2018-07-27T11:00:07.016171Z?1?[Note]?A?temporary?password?is?generated?for?root@localhost:?xxxxx #?mysql?-uroot?-p Enter?password: Welcome?to?the?MySQL?monitor.??Commands?end?with?;?or?\g. Your?MySQL?connection?id?is?4 Server?version:?5.7.22 Copyright?(c)?2000,?2018,?Oracle?and/or?its?affiliates.?All?rights?reserved. Oracle?is?a?registered?trademark?of?Oracle?Corporation?and/or?its affiliates.?Other?names?may?be?trademarks?of?their?respective owners. Type?'help;'?or?'\h'?for?help.?Type?'\c'?to?clear?the?current?input?statement. mysql> #強制修改密碼,否則無法使用。 mysql>?show?databases; ERROR?1820?(HY000):?You?must?reset?your?password?using?ALTER?USER?statement?before?executing?this?statement. mysql>?set?password=password('test123'); #密碼復雜度要求。 ERROR?1819?(HY000):?Your?password?does?not?satisfy?the?current?policy?requirements #復雜度提高后成功。 mysql>?set?password=password('Test@!234'); Query?OK,?0?rows?affected,?1?warning?(0.00?sec) |
?
?
轉載于:https://www.cnblogs.com/zksfyz/p/9435041.html
總結
以上是生活随笔為你收集整理的Centos6.7系统环境下使用 yum install 安装mysql-community-5.7.22(史上最简)的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: slice深拷贝数组
- 下一篇: python2.7虚拟环境