最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

CentOS7版本安裝Mysql8.0.20版本數(shù)據(jù)庫(kù)的詳細(xì)教程

 更新時(shí)間:2020年05月15日 11:27:10   作者:贍養(yǎng)  
這篇文章主要介紹了CentOS7版本安裝Mysql8.0.20版本數(shù)據(jù)庫(kù)的教程,本文通過實(shí)例代碼給大家介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或工作具有一定的參考借鑒價(jià)值,需要的朋友可以參考下

相關(guān)閱讀:

MySQL8.0.20安裝教程及其安裝問題詳細(xì)教程  http://www.fzitv.net/article/186202.htm

mysql8.0.20下載安裝及遇到的問題(圖文詳解)  http://www.fzitv.net/article/186208.htm

CentOS7安裝Mysql8.0.20步驟:

https://dev.mysql.com/doc/relnotes/mysql/8.0/en/news-8-0-20.html

官網(wǎng)下載有時(shí)速度比較慢,直接點(diǎn)擊鏈接也可以下載:mysql 8.0.20

官網(wǎng)下載8.0.20Mysql包(bundle版本)

1.創(chuàng)建mysql文件夾:

[root@localhost ~]# mkdir /usr/local/mysql
[root@localhost ~]# cd /usr/local/mysql/

將下載的mysql包放在創(chuàng)建的MySQL文件夾內(nèi):

[root@localhost mysql]# ll
總用量 815000
-rw-r--r--. 1 root root 834560000 5月 13 10:44 mysql-8.0.20-1.el7.x86_64.rpm-bundle.tar

mysql的安裝版MD5碼查看是否和官網(wǎng)上的相對(duì)應(yīng):

[root@localhost mysql]# md5sum mysql-8.0.20-1.el7.x86_64.rpm-bundle.tar 
c8d062c1f74d9aab7dbdd5300b202b6e mysql-8.0.20-1.el7.x86_64.rpm-bundle.tar

將mysql的包解壓得到幾個(gè)內(nèi)安裝包:

[root@localhost mysql]# tar -xvf mysql-8.0.20-1.el7.x86_64.rpm-bundle.tar 
mysql-community-libs-8.0.20-1.el7.x86_64.rpm
mysql-community-embedded-compat-8.0.20-1.el7.x86_64.rpm
mysql-community-test-8.0.20-1.el7.x86_64.rpm
mysql-community-common-8.0.20-1.el7.x86_64.rpm
mysql-community-devel-8.0.20-1.el7.x86_64.rpm
mysql-community-client-8.0.20-1.el7.x86_64.rpm
mysql-community-libs-compat-8.0.20-1.el7.x86_64.rpm
mysql-community-server-8.0.20-1.el7.x86_64.rpm
[root@localhost mysql]# ll
總用量 1630004
-rw-r--r--. 1 root root 834560000 5月 13 10:44 mysql-8.0.20-1.el7.x86_64.rpm-bundle.tar
-rw-r--r--. 1 7155 31415 48822048 3月 27 20:14 mysql-community-client-8.0.20-1.el7.x86_64.rpm
-rw-r--r--. 1 7155 31415 623508 3月 27 20:14 mysql-community-common-8.0.20-1.el7.x86_64.rpm
-rw-r--r--. 1 7155 31415 8129988 3月 27 20:14 mysql-community-devel-8.0.20-1.el7.x86_64.rpm
-rw-r--r--. 1 7155 31415 23599996 3月 27 20:14 mysql-community-embedded-compat-8.0.20-1.el7.x86_64.rpm
-rw-r--r--. 1 7155 31415 4667884 3月 27 20:14 mysql-community-libs-8.0.20-1.el7.x86_64.rpm
-rw-r--r--. 1 7155 31415 1277128 3月 27 20:14 mysql-community-libs-compat-8.0.20-1.el7.x86_64.rpm
-rw-r--r--. 1 7155 31415 512057468 3月 27 20:15 mysql-community-server-8.0.20-1.el7.x86_64.rpm
-rw-r--r--. 1 7155 31415 235369940 3月 27 20:16 mysql-community-test-8.0.20-1.el7.x86_64.rpm

依次安裝順序時(shí)common,libs,libs-compat,client,server:

警告:mysql-community-common-8.0.20-1.el7.x86_64.rpm: 頭V3 DSA/SHA1 Signature, 密鑰 ID ********: NOKEY
準(zhǔn)備中...  ################################# [100%]
正在升級(jí)/安裝...
 1:mysql-community-common-8.0.20-1.e################################# [100%]
警告:mysql-community-libs-8.0.20-1.el7.x86_64.rpm: 頭V3 DSA/SHA1 Signature, 密鑰 ID ********: NOKEY
準(zhǔn)備中...  ################################# [100%]
正在升級(jí)/安裝...
 1:mysql-community-libs-8.0.20-1.el7################################# [100%]
警告:mysql-community-libs-compat-8.0.20-1.el7.x86_64.rpm: 頭V3 DSA/SHA1 Signature, 密鑰 ID ********: NOKEY
準(zhǔn)備中...  ################################# [100%]
正在升級(jí)/安裝...
 1:mysql-community-libs-compat-8.0.2################################# [100%]
警告:mysql-community-client-8.0.20-1.el7.x86_64.rpm: 頭V3 DSA/SHA1 Signature, 密鑰 ID ********: NOKEY
準(zhǔn)備中...  ################################# [100%]
正在升級(jí)/安裝...
 1:mysql-community-client-8.0.20-1.e################################# [100%]
警告:mysql-community-server-8.0.20-1.el7.x86_64.rpm: 頭V3 DSA/SHA1 Signature, 密鑰 ID ********: NOKEY
準(zhǔn)備中...  ################################# [100%]
正在升級(jí)/安裝...
 1:mysql-community-server-8.0.20-1.e################################# [100%]

編輯一下/etc/my.cnf文件:
在最下面增加一行:

lower_case_table_names=1

initialize初始化:

[root@localhost mysql]# mysqld --initialize
[root@localhost mysql]#

更改一下權(quán)限:

[root@localhost mysql]# chown -R mysql:mysql /var/lib/mysql
[root@localhost mysql]# ll /var/lib/
總用量 8
drwxr-xr-x. 4 root root 32 5月 13 10:07 AccountsService
drwxr-xr-x. 2 root root 6 8月 3 2017 alsa
drwxr-xr-x. 2 root root 274 5月 13 10:14 alternatives
drwx------. 3 root root 18 5月 13 10:17 authconfig
drwxr-xr-x. 2 root root 6 8月 3 2017 bluetooth
drwxr-xr-x. 2 chrony chrony 6 8月 4 2017 chrony
drwxr-xr-x. 3 root root 17 5月 13 10:06 color
drwxr-xr-x. 4 colord colord 67 5月 13 10:23 colord
drwxr-xr-x. 2 root root 6 11月 7 2016 dbus
drwxr-xr-x. 2 root root 6 8月 4 2017 dhclient
drwxr-xr-x. 2 root root 6 8月 3 2017 dnsmasq
drwxr-xr-x. 3 root root 34 5月 13 10:24 flatpak
drwxr-xr-x. 2 root root 6 6月 24 2014 fprint
drwxr-xr-x. 2 root root 6 11月 5 2016 games
drwxrwx--T. 5 gdm gdm 70 5月 13 10:23 gdm
drwxr-xr-x. 2 geoclue geoclue 6 8月 2 2017 geoclue
drwxr-xr-x. 4 root root 55 5月 13 02:22 gssproxy
drwxr-xr-x. 2 root root 6 8月 2 2017 hyperv
drwxr-xr-x. 2 root root 6 8月 5 2017 initramfs
drwxr-xr-x. 8 root root 90 5月 13 10:07 iscsi
drwxr-xr-x. 8 root root 93 5月 13 10:08 libvirt
drwxr-xr-x. 2 root root 6 11月 6 2016 lldpad
drwxr-xr-x. 2 root root 6 8月 2 2017 logrotate
drwx------. 2 root root 6 5月 13 10:06 machines
drwxr-xr-x. 2 root root 37 5月 13 02:22 misc
drwxr-x---. 2 root slocate 6 11月 5 2016 mlocate
drwxr-x--x. 6 mysql mysql 4096 5月 13 11:05 mysql

啟動(dòng)mysql服務(wù)看一下服務(wù)狀態(tài),看Active這一行的狀態(tài):

[root@localhost mysql]# systemctl start mysqld.service 
[root@localhost mysql]# systemctl status mysqld.service 
● mysqld.service - MySQL Server
 Loaded: loaded (/usr/lib/systemd/system/mysqld.service; enabled; vendor preset: disabled)
 Active: active (running) since 三 2020-05-13 11:09:35 CST; 8s ago
 Docs: man:mysqld(8)
 http://dev.mysql.com/doc/refman/en/using-systemd.html
 Process: 16795 ExecStartPre=/usr/bin/mysqld_pre_systemd (code=exited, status=0/SUCCESS)
 Main PID: 16829 (mysqld)
 Status: "Server is operational"
 CGroup: /system.slice/mysqld.service
 └─16829 /usr/sbin/mysqld

5月 13 11:09:24 localhost.localdomain systemd[1]: Starting MySQL Server...
5月 13 11:09:35 localhost.localdomain systemd[1]: Started MySQL Server.
[root@localhost mysql]#

查看數(shù)據(jù)庫(kù)初始的密碼:

[root@localhost mysql]# cat /var/log/mysqld.log | grep password
2020-05-13T03:05:16.041238Z 6 [Note] [MY-010454] 
[Server] A temporary password is generated for root@localhost: n_t#tk.Z?7)f

使用初始密碼登陸數(shù)據(jù)庫(kù):后更改密碼:

[root@localhost mysql]# mysql -uroot -p
Enter password: 
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 8
Server version: 8.0.20

Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql>
mysql> ALTER user 'root'@'localhost' identified with mysql_native_password by '123456';
Query OK, 0 rows affected (0.04 sec)

mysql> exit
Bye
[root@localhost mysql]# mysql -uroot -p
Enter password: 
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 9
Server version: 8.0.20 MySQL Community Server - GPL

Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> SELECT VERSION;
ERROR 1054 (42S22): Unknown column 'VERSION' in 'field list'
mysql> SELECT VERSION();
+-----------+
| VERSION() |
+-----------+
| 8.0.20 |
+-----------+
1 row in set (0.00 sec)

mysql>

到此可以正常登陸數(shù)據(jù)庫(kù)了,可以自行查找開啟遠(yuǎn)程方式。

總結(jié)

到此這篇關(guān)于CentOS7版本安裝Mysql8.0.20版本數(shù)據(jù)庫(kù)的詳細(xì)教程的文章就介紹到這了,更多相關(guān)CentOS7安裝Mysql8.0數(shù)據(jù)庫(kù)內(nèi)容請(qǐng)搜索腳本之家以前的文章或繼續(xù)瀏覽下面的相關(guān)文章希望大家以后多多支持腳本之家!

相關(guān)文章

  • MySQL運(yùn)維實(shí)戰(zhàn)使用RPM進(jìn)行安裝部署

    MySQL運(yùn)維實(shí)戰(zhàn)使用RPM進(jìn)行安裝部署

    這篇文章主要為大家介紹了MySQL運(yùn)維實(shí)戰(zhàn)使用RPM進(jìn)行安裝部署實(shí)現(xiàn)示例詳解,有需要的朋友可以借鑒參考下,希望能夠有所幫助,祝大家多多進(jìn)步,早日升職加薪
    2023-12-12
  • 在MySQL現(xiàn)有表中添加自增ID的方法步驟

    在MySQL現(xiàn)有表中添加自增ID的方法步驟

    當(dāng)在MySQL數(shù)據(jù)庫(kù)中,自增ID是一種常見的主鍵類型,它為表中的每一行分配唯一的標(biāo)識(shí)符,在某些情況下,我們可能需要在現(xiàn)有的MySQL表中添加自增ID,以便更好地管理和索引數(shù)據(jù),在本文中,我們將討論如何在MySQL現(xiàn)有表中添加自增ID,并介紹相關(guān)的步驟和案例
    2023-09-09
  • SQL查詢超時(shí)的設(shè)置方法(關(guān)于timeout的處理)

    SQL查詢超時(shí)的設(shè)置方法(關(guān)于timeout的處理)

    為了優(yōu)化OceanBase的query timeout設(shè)置方式,特調(diào)研MySQL關(guān)于timeout的處理,下面與大家分享下處理記錄,感興趣的朋友可以參考下哈
    2013-04-04
  • MySQL占用內(nèi)存較大與CPU過高測(cè)試與解決辦法

    MySQL占用內(nèi)存較大與CPU過高測(cè)試與解決辦法

    為了裝mysql環(huán)境測(cè)試,裝上后發(fā)現(xiàn)啟動(dòng)后MySQL占用內(nèi)存了很大,達(dá)8百多兆。網(wǎng)上搜索了一下,得到高人指點(diǎn)my.ini。再也沒見再詳細(xì)的了..只好打開my.ini逐行的啃,雖然英文差了點(diǎn),不過多少M(fèi)還是看得明的
    2018-03-03
  • mysql binlog(二進(jìn)制日志)查看方法

    mysql binlog(二進(jìn)制日志)查看方法

    在本篇文章里小編給大家分享了關(guān)于mysql binlog(二進(jìn)制日志)查看方法,有需要的朋友們學(xué)習(xí)下。
    2019-01-01
  • MySQL非常重要的日志bin log詳解

    MySQL非常重要的日志bin log詳解

    bin log想必大家多多少少都有聽過,它是MySQL中一個(gè)非常重要的日志,因?yàn)樗婕暗綌?shù)據(jù)庫(kù)層面的主從復(fù)制、高可用等設(shè)計(jì),所以本文就給大家詳細(xì)的講解MySQL非常重要的日志—bin log,需要的朋友可以參考下
    2023-07-07
  • mysql主從復(fù)制讀寫分離的配置方法詳解

    mysql主從復(fù)制讀寫分離的配置方法詳解

    一般來說mysql都是通過 主從復(fù)制(Master-Slave)的方式來同步數(shù)據(jù),再通過讀寫分離(MySQL-Proxy)來提升數(shù)據(jù)庫(kù)的并發(fā)負(fù)載能力 這樣的方案來進(jìn)行部署與實(shí)施的。
    2018-04-04
  • Mysql創(chuàng)建json字段索引的兩種方式

    Mysql創(chuàng)建json字段索引的兩種方式

    本文主要介紹了Mysql創(chuàng)建json字段索引的兩種方式,文中通過示例代碼介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友們下面隨著小編來一起學(xué)習(xí)學(xué)習(xí)吧
    2023-06-06
  • MySQL自動(dòng)為查詢數(shù)據(jù)結(jié)果加序號(hào)

    MySQL自動(dòng)為查詢數(shù)據(jù)結(jié)果加序號(hào)

    這篇文章主要給大家介紹了關(guān)于MYSQL如何自動(dòng)為查詢數(shù)據(jù)的結(jié)果編上序號(hào)的相關(guān)資料,文中通過示例代碼介紹的非常詳細(xì),對(duì)大家學(xué)習(xí)或者使用mysql具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友們下面隨著小編來一起看看吧
    2022-12-12
  • Mysql觸發(fā)器在PHP項(xiàng)目中用來做信息備份、恢復(fù)和清空

    Mysql觸發(fā)器在PHP項(xiàng)目中用來做信息備份、恢復(fù)和清空

    這篇文章主要介紹了Mysql觸發(fā)器在PHP項(xiàng)目中用來做信息備份、恢復(fù)和清空的相關(guān)資料,需要的朋友可以參考下
    2017-11-11

最新評(píng)論

资溪县| 长寿区| 衡水市| 外汇| 高平市| 文化| 柘城县| 咸丰县| 云霄县| 靖州| 宾川县| 稻城县| 融水| 甘洛县| 勃利县| 衡水市| 宜都市| 钦州市| 宿松县| 永年县| 阿拉尔市| 牡丹江市| 南部县| 满洲里市| 博乐市| 织金县| 德惠市| 富阳市| 高密市| 明光市| 思南县| 济南市| 黎城县| 西乌珠穆沁旗| 长沙市| 垦利县| 关岭| 康保县| 会昌县| 保康县| 定结县|