環(huán)境
OS:CentOS7.6
MySQL:Mysql5.7
創(chuàng)新互聯(lián)建站提供成都做網(wǎng)站、成都網(wǎng)站建設(shè)、網(wǎng)頁(yè)設(shè)計(jì),品牌網(wǎng)站建設(shè),1元廣告等致力于企業(yè)網(wǎng)站建設(shè)與公司網(wǎng)站制作,十余年的網(wǎng)站開發(fā)和建站經(jīng)驗(yàn),助力企業(yè)信息化建設(shè),成功案例突破數(shù)千家,是您實(shí)現(xiàn)網(wǎng)站建設(shè)的好選擇.
#下載mysql源安裝包
wget http://dev.mysql.com/get/mysql57-community-release-el7-8.noarch.rpm
#安裝mysql源
yum localinstall mysql57-community-release-el7-8.noarch.rpm
#檢測(cè)源是否安裝成功
yum repolist enabled | grep "mysql.*-community.*"
#Enable to use MySQL 5.6
[mysql56-community]
name=MySQL 5.6 Community Server
baseurl=http://repo.mysql.com/yum/mysql-5.6-community/el/7/$basearch/
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql
[mysql57-community]
name=MySQL 5.7 Community Server
baseurl=http://repo.mysql.com/yum/mysql-5.7-community/el/7/$basearch/
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql
yum安裝
yum install mysql-community-server
systemctl start mysqld //啟動(dòng)mysql服務(wù)
systemctl status mysqld
systemctl enable mysqld
systemctl daemon-reload //重載服務(wù)
mysql> set password for 'root'@'localhost'=password('xxxxxxxx');
查看密碼策略:
mysql> show variables like '%password%'
0 => LOW,1 => MEDIUM,2 => STRONG
命令行修改:
set global validate_password_policy=0; //設(shè)置密碼策略等級(jí)
set global validate_password_length=6; //設(shè)置密碼最小長(zhǎng)度
重啟mysql服務(wù)
systemctl restart mysqld
新聞標(biāo)題:yum方式安裝Myql
分享網(wǎng)址:http://jinyejixie.com/article46/gcepeg.html
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供外貿(mào)建站、Google、品牌網(wǎng)站建設(shè)、、網(wǎng)站導(dǎo)航、企業(yè)網(wǎng)站制作
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請(qǐng)盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如需處理請(qǐng)聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來源: 創(chuàng)新互聯(lián)