日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 运维知识 > 数据库 >内容正文

数据库

Red Hat Enterprise Linux Server release 7.4 (Maipo) 安装mysql5.7.36

發(fā)布時間:2023/12/8 数据库 34 豆豆
生活随笔 收集整理的這篇文章主要介紹了 Red Hat Enterprise Linux Server release 7.4 (Maipo) 安装mysql5.7.36 小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.

1. 版本

?

[root@localhost mysql]# cat /etc/redhat-release Red Hat Enterprise Linux Server release 7.4 (Maipo)[root@localhost mysql]# ll -rw-r--r--. 1 root root 545863680 11月 4 19:55 mysql-5.7.36-1.el7.x86_64.rpm-bundle.tar

2. 解壓 mysql

?

tar -xvf mysql-5.7.36-1.el7.x86_64.rpm-bundle.tar

3. 安裝mysql

解壓后的
?

-rw-r--r--. 1 root root 545863680 11月 4 19:55 mysql-5.7.36-1.el7.x86_64.rpm-bundle.tar -rw-r--r--. 1 7155 31415 26664808 9月 8 08:34 mysql-community-client-5.7.36-1.el7.x86_64.rpm -rw-r--r--. 1 7155 31415 317808 9月 8 08:34 mysql-community-common-5.7.36-1.el7.x86_64.rpm -rw-r--r--. 1 7155 31415 4118740 9月 8 08:34 mysql-community-devel-5.7.36-1.el7.x86_64.rpm -rw-r--r--. 1 7155 31415 47760636 9月 8 08:34 mysql-community-embedded-5.7.36-1.el7.x86_64.rpm -rw-r--r--. 1 7155 31415 23316608 9月 8 08:34 mysql-community-embedded-compat-5.7.36-1.el7.x86_64.rpm -rw-r--r--. 1 7155 31415 132191192 9月 8 08:34 mysql-community-embedded-devel-5.7.36-1.el7.x86_64.rpm -rw-r--r--. 1 7155 31415 2473272 9月 8 08:34 mysql-community-libs-5.7.36-1.el7.x86_64.rpm -rw-r--r--. 1 7155 31415 1263988 9月 8 08:34 mysql-community-libs-compat-5.7.36-1.el7.x86_64.rpm -rw-r--r--. 1 7155 31415 182267476 9月 8 08:34 mysql-community-server-5.7.36-1.el7.x86_64.rpm -rw-r--r--. 1 7155 31415 125479900 9月 8 08:35 mysql-community-test-5.7.36-1.el7.x86_64.rpm

安裝:rpm -ivh mysql-community-common-5.7.36-1.el7.x86_64.rpm? 提示: file /usr/share/mysql/czech/errmsg.sys from install of mysql-community-common-5.7.36-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.56-2.el7.x86_64

[root@localhost mysql]# rpm -ivh mysql-community-common-5.7.36-1.el7.x86_64.rpm 警告:mysql-community-common-5.7.36-1.el7.x86_64.rpm: 頭V3 DSA/SHA256 Signature, 密鑰 ID 5072e1f5: NOKEY 準備中... ################################# [100%]file /usr/share/mysql/czech/errmsg.sys from install of mysql-community-common-5.7.36-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.56-2.el7.x86_64file /usr/share/mysql/danish/errmsg.sys from install of mysql-community-common-5.7.36-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.56-2.el7.x86_64file /usr/share/mysql/dutch/errmsg.sys from install of mysql-community-common-5.7.36-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.56-2.el7.x86_64file /usr/share/mysql/english/errmsg.sys from install of mysql-community-common-5.7.36-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.56-2.el7.x86_64file /usr/share/mysql/estonian/errmsg.sys from install of mysql-community-common-5.7.36-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.56-2.el7.x86_64file /usr/share/mysql/french/errmsg.sys from install of mysql-community-common-5.7.36-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.56-2.el7.x86_64file /usr/share/mysql/german/errmsg.sys from install of mysql-community-common-5.7.36-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.56-2.el7.x86_64file /usr/share/mysql/greek/errmsg.sys from install of mysql-community-common-5.7.36-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.56-2.el7.x86_64file /usr/share/mysql/hungarian/errmsg.sys from install of mysql-community-common-5.7.36-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.56-2.el7.x86_64file /usr/share/mysql/italian/errmsg.sys from install of mysql-community-common-5.7.36-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.56-2.el7.x86_64file /usr/share/mysql/japanese/errmsg.sys from install of mysql-community-common-5.7.36-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.56-2.el7.x86_64file /usr/share/mysql/korean/errmsg.sys from install of mysql-community-common-5.7.36-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.56-2.el7.x86_64file /usr/share/mysql/norwegian-ny/errmsg.sys from install of mysql-community-common-5.7.36-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.56-2.el7.x86_64file /usr/share/mysql/norwegian/errmsg.sys from install of mysql-community-common-5.7.36-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.56-2.el7.x86_64file /usr/share/mysql/polish/errmsg.sys from install of mysql-community-common-5.7.36-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.56-2.el7.x86_64file /usr/share/mysql/portuguese/errmsg.sys from install of mysql-community-common-5.7.36-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.56-2.el7.x86_64file /usr/share/mysql/romanian/errmsg.sys from install of mysql-community-common-5.7.36-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.56-2.el7.x86_64file /usr/share/mysql/russian/errmsg.sys from install of mysql-community-common-5.7.36-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.56-2.el7.x86_64file /usr/share/mysql/serbian/errmsg.sys from install of mysql-community-common-5.7.36-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.56-2.el7.x86_64file /usr/share/mysql/slovak/errmsg.sys from install of mysql-community-common-5.7.36-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.56-2.el7.x86_64file /usr/share/mysql/spanish/errmsg.sys from install of mysql-community-common-5.7.36-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.56-2.el7.x86_64file /usr/share/mysql/swedish/errmsg.sys from install of mysql-community-common-5.7.36-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.56-2.el7.x86_64file /usr/share/mysql/ukrainian/errmsg.sys from install of mysql-community-common-5.7.36-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.56-2.el7.x86_64file /usr/share/mysql/charsets/Index.xml from install of mysql-community-common-5.7.36-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.56-2.el7.x86_64file /usr/share/mysql/charsets/armscii8.xml from install of mysql-community-common-5.7.36-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.56-2.el7.x86_64file /usr/share/mysql/charsets/ascii.xml from install of mysql-community-common-5.7.36-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.56-2.el7.x86_64file /usr/share/mysql/charsets/cp1250.xml from install of mysql-community-common-5.7.36-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.56-2.el7.x86_64file /usr/share/mysql/charsets/cp1251.xml from install of mysql-community-common-5.7.36-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.56-2.el7.x86_64file /usr/share/mysql/charsets/cp1256.xml from install of mysql-community-common-5.7.36-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.56-2.el7.x86_64file /usr/share/mysql/charsets/cp1257.xml from install of mysql-community-common-5.7.36-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.56-2.el7.x86_64file /usr/share/mysql/charsets/cp850.xml from install of mysql-community-common-5.7.36-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.56-2.el7.x86_64file /usr/share/mysql/charsets/cp852.xml from install of mysql-community-common-5.7.36-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.56-2.el7.x86_64file /usr/share/mysql/charsets/cp866.xml from install of mysql-community-common-5.7.36-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.56-2.el7.x86_64file /usr/share/mysql/charsets/dec8.xml from install of mysql-community-common-5.7.36-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.56-2.el7.x86_64file /usr/share/mysql/charsets/geostd8.xml from install of mysql-community-common-5.7.36-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.56-2.el7.x86_64file /usr/share/mysql/charsets/greek.xml from install of mysql-community-common-5.7.36-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.56-2.el7.x86_64file /usr/share/mysql/charsets/hebrew.xml from install of mysql-community-common-5.7.36-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.56-2.el7.x86_64file /usr/share/mysql/charsets/hp8.xml from install of mysql-community-common-5.7.36-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.56-2.el7.x86_64file /usr/share/mysql/charsets/keybcs2.xml from install of mysql-community-common-5.7.36-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.56-2.el7.x86_64file /usr/share/mysql/charsets/koi8r.xml from install of mysql-community-common-5.7.36-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.56-2.el7.x86_64file /usr/share/mysql/charsets/koi8u.xml from install of mysql-community-common-5.7.36-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.56-2.el7.x86_64file /usr/share/mysql/charsets/latin1.xml from install of mysql-community-common-5.7.36-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.56-2.el7.x86_64file /usr/share/mysql/charsets/latin2.xml from install of mysql-community-common-5.7.36-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.56-2.el7.x86_64file /usr/share/mysql/charsets/latin5.xml from install of mysql-community-common-5.7.36-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.56-2.el7.x86_64file /usr/share/mysql/charsets/latin7.xml from install of mysql-community-common-5.7.36-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.56-2.el7.x86_64file /usr/share/mysql/charsets/macce.xml from install of mysql-community-common-5.7.36-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.56-2.el7.x86_64file /usr/share/mysql/charsets/macroman.xml from install of mysql-community-common-5.7.36-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.56-2.el7.x86_64file /usr/share/mysql/charsets/swe7.xml from install of mysql-community-common-5.7.36-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.56-2.el7.x86_64 [root@localhost mysql]#

原因:

? ? ? ? 已經安裝??mariadb-libs

[root@localhost mysql]# rpm -qa | grep mariadb-libs
mariadb-libs-5.5.56-2.el7.x86_64

?

需要卸載 ,mariadb-libs

yum remove -y mariadb-libs-5.5.56-2.el7.x86_64

[root@localhost mysql]# yum remove -y mariadb-libs-5.5.56-2.el7.x86_64 已加載插件:langpacks, product-id, search-disabled-repos, subscription-manager This system is not registered with an entitlement server. You can use subscription-manager to register. 正在解決依賴關系 --> 正在檢查事務 ---> 軟件包 mariadb-libs.x86_64.1.5.5.56-2.el7 將被 刪除 --> 正在處理依賴關系 libmysqlclient.so.18()(64bit),它被軟件包 2:postfix-2.10.1-6.el7.x86_64 需要 --> 正在處理依賴關系 libmysqlclient.so.18(libmysqlclient_18)(64bit),它被軟件包 2:postfix-2.10.1-6.el7.x86_64 需要 --> 正在檢查事務 ---> 軟件包 postfix.x86_64.2.2.10.1-6.el7 將被 刪除 --> 解決依賴關系完成依賴關系解決===============================================================================================================================================Package 架構 版本 源 大小 =============================================================================================================================================== 正在刪除:mariadb-libs x86_64 1:5.5.56-2.el7 @anaconda/7.4 4.4 M 為依賴而移除:postfix x86_64 2:2.10.1-6.el7 @anaconda/7.4 12 M事務概要 =============================================================================================================================================== 移除 1 軟件包 (+1 依賴軟件包)安裝大小:17 M Downloading packages: Running transaction check Running transaction test Transaction test succeeded Running transaction 警告:RPM 數(shù)據(jù)庫已被非 yum 程序修改。正在刪除 : 2:postfix-2.10.1-6.el7.x86_64 1/2 正在刪除 : 1:mariadb-libs-5.5.56-2.el7.x86_64 2/2 驗證中 : 1:mariadb-libs-5.5.56-2.el7.x86_64 1/2 驗證中 : 2:postfix-2.10.1-6.el7.x86_64 2/2 刪除:mariadb-libs.x86_64 1:5.5.56-2.el7 作為依賴被刪除:postfix.x86_64 2:2.10.1-6.el7 完畢! [root@localhost mysql]#

?

然后依次 安裝:

rpm -ivh mysql-community-common-5.7.36-1.el7.x86_64.rpm
rpm -ivh mysql-community-libs-5.7.36-1.el7.x86_64.rpm
rpm -ivh mysql-community-devel-5.7.36-1.el7.x86_64.rpm
rpm -ivh mysql-community-client-5.7.36-1.el7.x86_64.rpm
rpm -ivh mysql-community-server-5.7.36-1.el7.x86_64.rpm

[root@localhost mysql]# rpm -ivh mysql-community-common-5.7.36-1.el7.x86_64.rpm 警告:mysql-community-common-5.7.36-1.el7.x86_64.rpm: 頭V3 DSA/SHA256 Signature, 密鑰 ID 5072e1f5: NOKEY 準備中... ################################# [100%] 正在升級/安裝...1:mysql-community-common-5.7.36-1.e################################# [100%] [root@localhost mysql]# [root@localhost mysql]# rpm -ivh mysql-community-libs-5.7.36-1.el7.x86_64.rpm 警告:mysql-community-libs-5.7.36-1.el7.x86_64.rpm: 頭V3 DSA/SHA256 Signature, 密鑰 ID 5072e1f5: NOKEY 準備中... ################################# [100%] 正在升級/安裝...1:mysql-community-libs-5.7.36-1.el7################################# [100%] [root@localhost mysql]# [root@localhost mysql]# rpm -ivh mysql-community-devel-5.7.36-1.el7.x86_64.rpm 警告:mysql-community-devel-5.7.36-1.el7.x86_64.rpm: 頭V3 DSA/SHA256 Signature, 密鑰 ID 5072e1f5: NOKEY 準備中... ################################# [100%] 正在升級/安裝...1:mysql-community-devel-5.7.36-1.el################################# [100%] [root@localhost mysql]# [root@localhost mysql]# rpm -ivh mysql-community-client-5.7.36-1.el7.x86_64.rpm 警告:mysql-community-client-5.7.36-1.el7.x86_64.rpm: 頭V3 DSA/SHA256 Signature, 密鑰 ID 5072e1f5: NOKEY 準備中... ################################# [100%] 正在升級/安裝...1:mysql-community-client-5.7.36-1.e################################# [100%] [root@localhost mysql]# [root@localhost mysql]# rpm -ivh mysql-community-server-5.7.36-1.el7.x86_64.rpm 警告:mysql-community-server-5.7.36-1.el7.x86_64.rpm: 頭V3 DSA/SHA256 Signature, 密鑰 ID 5072e1f5: NOKEY 準備中... ################################# [100%] 正在升級/安裝...1:mysql-community-server-5.7.36-1.e################################# [100%] [root@localhost mysql]#

4. 查看、啟動、關閉 mysql

service mysqld status

service mysqld start

service mysqld stop

?

5. 首次登錄 查找密碼

grep "temporary password" /var/log/mysqld.log

本次的 密碼是 z?u;EkW2Fgfa

6. 登錄mysql 修改密碼

mysql -u root -p? ? ?##回車,選擇自己安裝的?提示的密碼,z?u;EkW2Fgfa

登錄mysql后, 設置密碼

ALTER USER 'root'@'localhost' IDENTIFIED BY '你的密碼';

?

6.? 如果有需要 設置其他ip可以登錄本機mysql

6.1 登錄mysql

[root@localhost ~]# mysql -u root -p
Enter password:?

6.2 設置

mysql> use mysql; Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -ADatabase changed mysql> mysql> select 'host' from user where user='root'; +------+ | host | +------+ | host | +------+ 1 row in set (0.00 sec)mysql> update user set host = '%' where user ='root'; Query OK, 1 row affected (0.00 sec) Rows matched: 1 Changed: 1 Warnings: 0mysql> flush privileges; Query OK, 0 rows affected (0.00 sec)mysql> select 'host' from user where user='root'; +------+ | host | +------+ | host | +------+ 1 row in set (0.00 sec)mysql>

?

總結

以上是生活随笔為你收集整理的Red Hat Enterprise Linux Server release 7.4 (Maipo) 安装mysql5.7.36的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。