2018-08-27 14:26:49 949瀏覽
今天扣丁學堂Linux培訓老師給大家介紹一下關(guān)于在CentOS7中安裝MySQL的話會默認安裝的是MariaDB。它是一個在MySQL被收購之后,作者推出的應(yīng)一個開源版本。但是,我們可能還是會想安裝更純正的MySQL?下面我們一起來看一下吧。
wget -i -c https://dev.mysql.com/get/mysql80-community-release-el7-1.noarch.rpm
yum -y install mysql80-community-release-el7-1.noarch.rp
yum -y install mysql-community-server
systemctl start mysqld.service
systemctl status mysqld.service
grep "passsword" /var/log/mysqld.log
mysql> ALTER USER 'root'@'localhost' IDENTIFIED BY 'new password';
yum -y remove mysql80-community-release-el7-1.noarch
shell> systemctl enable mysqld shell> systemctl daemon-reload
mysql> GRANT ALL PRIVILEGES ON *.* TO 'yangxin'@'%' IDENTIFIED BY 'Yangxin0917!' WITH GRANT OPTION;
創(chuàng)建用戶 mysql>create user chenadmin@'%' identified by 'Chenadmin0.'; 進行賦值 mysql>grant all privileges on *.* to chenadmin@'%' with grant option; 最后刷新 mysql>flush privileges;
[mysqld] character_set_server=utf8 init_connect='SET NAMES utf8'重新啟動mysql服務(wù)
systemctl restart mysqld
以上就是扣丁學堂Linux開發(fā)CentOS 7安裝MySQL詳細步驟的全部內(nèi)容,希望對同學們有所幫助,想要了解更多關(guān)于Linux開發(fā)方面內(nèi)容的小伙伴可以登錄扣丁學堂官網(wǎng)咨詢??鄱W堂有大量的Linux視頻教程讓學員免費觀看學習,想要快速學習Linux開發(fā)就到由專業(yè)老師授課的扣丁學堂學習吧??鄱W堂Linux技術(shù)交流群:422345477。
【關(guān)注微信公眾號獲取更多學習資料】
查看更多關(guān)于“Linux培訓資訊”的相關(guān)文章>>