国产成人精品久久免费动漫-国产成人精品天堂-国产成人精品区在线观看-国产成人精品日本-a级毛片无码免费真人-a级毛片毛片免费观看久潮喷

您的位置:首頁技術文章
文章詳情頁

Centos7 安裝 Mysql8教程

瀏覽:3日期:2023-10-13 09:48:22

Mysql8新特性:

Mysql從5.x版本直接跳躍到8.x,我個人是這么看的:

MySQL 5.5 -> MySQL 5MySQL 5.6 -> MySQL 6MySQL 5.7 -> MySQL 7MySQL 8.0 -> MySQL 8

當然也有可能是Mysql6、7內部難產了-_-,自從被Oracle收購后,活力依舊在,mysql8有以下新特性:

MySQL 文檔存儲 默認 utf8mb4 編碼 JSON 增強 CTEs(譯者注:Common Table Expresssions 公共表格表達式) 窗口函數 降序索引 更好的優化器消費模型 MySQL 服務器組件 GIS(譯者注:Geographic Information System 地理信息系統) 提升 InnoDB 引擎的 NO WAIT 和 SKIP LOCKED 選項

Centos7 Mysql8安裝步驟:

1、設置mysql源

首先,您需要在MySQL提供的系統中啟用MySQL yum存儲庫。 根據您的操作系統版本執行以下命令之一,這里我們選擇CentOS 7 / RHEL 7的源

###在CentOS 7 / RHEL 7系統上### rpm -Uvh https://repo.mysql.com/mysql80-community-release-el7-3.noarch.rpm###在CentOS 7 / RHEL 6系統上### rpm -Uvh https://repo.mysql.com/mysql80-community-release-el6-3.noarch.rpm###在Fedora 30系統上### rpm -Uvh https://repo.mysql.com/mysql80-community-release-fc30-1.noarch.rpm###在Fedora 29系統上### rpm -Uvh https://repo.mysql.com/mysql80-community-release-fc29-2.noarch.rpm###在Fedora 28系統上### rpm -Uvh https://repo.mysql.com/mysql80-community-release-fc28-2.noarch.rpm

2、安裝MySQL Community Server

MySQL yum存儲庫包含用于多個MySQL版本的多個存儲庫配置。 因此,首先禁用mysql repo文件中的所有存儲庫

sed -i ’s/enabled=1/enabled=0/’ /etc/yum.repos.d/mysql-community.repo

啟用centos mysql8版本

## CentOS & RedHat 版本yum --enablerepo=mysql80-community install mysql-community-server## Fedora Systems 版本dnf --enablerepo=mysql80-community install mysql-community-server

3、啟動MySQL服務

service mysqld start

使用Systemd

systemctl start mysqld.service

4、查找MySQL root密碼

安裝MySQL 8.0后,將為MySQL根用戶創建一個臨時密碼。 您可以在日志文件中找到生成的臨時密碼。密碼文件位置:/var/log/mysqld.log

grep 'A temporary password' /var/log/mysqld.log

5、重置root密碼

首次安裝MySQL后,執行mysql_secure_installation命令以保護MySQL服務器,包含重置密碼步驟

mysql_secure_installation

Enter password for user root:The existing password for the user account root has expired. Please set a new password.New password:Re-enter new password:Remove anonymous users? (Press y|Y for Yes, any other key for No) : yDisallow root login remotely? (Press y|Y for Yes, any other key for No) : yRemove test database and access to it? (Press y|Y for Yes, any other key for No) : yReload privilege tables now? (Press y|Y for Yes, any other key for No) : y

6、mysql 服務加入開機啟動項,并啟動mysql進程

### Using Systemdsystemctl enable mysqld.servicesystemctl restart mysqld.service

7、開放3306端口

如果服務器開啟了防火墻,記得開啟3306端口

systemctl enable iptablessystemctl start iptablesvim /etc/sysconfig/iptables##規則中加入-A INPUT -p tcp -m state --state NEW -m tcp --dport 3306 -j ACCEPT##重啟防火墻systemctl enable iptables.servicesystemctl start iptables.service

如果使用的騰訊云的服務器,一定記得開啟安全組里的端口

附mysql常用命令:

登錄mysql

mysql -u username -p

啟動mysql

systemctl start mysqld.service

結束mysql

systemctl stop mysqld.service

重啟mysql

systemctl restart mysqld.service

開機自啟

systemctl enable mysqld.service

以上就是Centos7 安裝 Mysql8教程的詳細內容,更多關于Centos7 安裝 Mysql8的資料請關注好吧啦網其它相關文章!

標簽: MySQL 數據庫
相關文章:
主站蜘蛛池模板: 精品国产免费第一区二区三区日韩 | 亚洲视频中文字幕 | 九草视频在线 | 国产在线不卡午夜精品2021 | 97视频在线看 | 成人毛片网 | 日韩精品中文字幕在线观看 | 一级片在线免费看 | 精品国产美女福到在线不卡f | 中文字幕日本不卡 | 免费看一区二区三区 | 在线免费成人 | 亚洲午夜精品一级在线播放放 | 免费一级毛片女人图片 | 分享一个无毒不卡免费国产 | 日韩国产成人资源精品视频 | 欧美国产成人免费观看永久视频 | 性生大片一级毛片免费观看 | 亚洲性视频网站 | 精品国产香蕉伊思人在线 | 亚洲精品一区二区在线观看 | 在线はじめてのおるすばん | 日本二区免费一片黄2019 | 三级国产在线 | 一a一片一级一片啪啪 | 欧美一级毛片俄罗斯 | 天天看夜夜| 国产一区亚洲欧美成人 | 欧美大片在线观看成人 | 国产视频a | 亚洲国产99在线精品一区二区 | 免费一级欧美毛片 | 爱视频福利广场 | 国产女王vk | 日韩欧美在线一级一中文字暮 | 男人的天堂高清在线观看 | 日韩成人小视频 | 欧美日本一道道一区二区三 | 国产一区二区三区在线观看影院 | 国产日韩欧美一区二区 | 114一级毛片免费 |