centos7.4系統(tǒng)中yum源安裝mysql 5.6
系統(tǒng)環(huán)境:centos7.4
一,查看是否安裝有數(shù)據(jù)庫(kù):
yum list installed | grep mysqld/mariadb
二,安裝centos7系統(tǒng)帶有mysql5.6安裝包的yum源RPM資源包:
rpm -Uvh http://dev.mysql.com/get/mysql-community-release-el7-5.noarch.rpm yum clean all yum repolist
三,安裝msyql5.6:
yum -y install mysql-community-server
四,啟動(dòng)服務(wù):
systemctl start mysqld systemctl enable mysqld
五,重置密碼:是具體情況而定(可以省略,無(wú)密碼登陸)
#mysql_secure_installation Set root password? [Y/n] y [設(shè)置root用戶密碼] Remove anonymous users? [Y/n] y [刪除匿名用戶] Disallow root login remotely? [Y/n] n [禁止root遠(yuǎn)程登錄](méi) Remove test database and access to it? [Y/n] y [刪除test數(shù)據(jù)庫(kù)] Reload privilege tables now? [Y/n] y [刷新權(quán)限]
六,查看mysql版本:
mysql -V mysql Ver 14.14 Distrib 5.6.39, for Linux (x86_64) using EditLine wrapper
七,驗(yàn)證:(無(wú)密碼)
mysql -uroot -p 密碼
八、設(shè)置密碼和遠(yuǎn)程權(quán)限
數(shù)據(jù)庫(kù)密碼設(shè)置:#set password for 'root'@'localhost'=password('userpasswd');
九、配置防火墻
firewall-cmd --zone=public --add-port=3306/tcp --permanent
版權(quán)聲明:本站文章來(lái)源標(biāo)注為YINGSOO的內(nèi)容版權(quán)均為本站所有,歡迎引用、轉(zhuǎn)載,請(qǐng)保持原文完整并注明來(lái)源及原文鏈接。禁止復(fù)制或仿造本網(wǎng)站,禁止在非maisonbaluchon.cn所屬的服務(wù)器上建立鏡像,否則將依法追究法律責(zé)任。本站部分內(nèi)容來(lái)源于網(wǎng)友推薦、互聯(lián)網(wǎng)收集整理而來(lái),僅供學(xué)習(xí)參考,不代表本站立場(chǎng),如有內(nèi)容涉嫌侵權(quán),請(qǐng)聯(lián)系alex-e#qq.com處理。
關(guān)注官方微信