国产片侵犯亲女视频播放_亚洲精品二区_在线免费国产视频_欧美精品一区二区三区在线_少妇久久久_在线观看av不卡

服務器之家:專注于服務器技術及軟件下載分享
分類導航

Mysql|Sql Server|Oracle|Redis|MongoDB|PostgreSQL|Sqlite|DB2|mariadb|Access|數據庫技術|

服務器之家 - 數據庫 - Mysql - CentOS7版本安裝Mysql8.0.20版本數據庫的詳細教程

CentOS7版本安裝Mysql8.0.20版本數據庫的詳細教程

2021-01-18 14:38贍養 Mysql

這篇文章主要介紹了CentOS7版本安裝Mysql8.0.20版本數據庫的教程,本文通過實例代碼給大家介紹的非常詳細,對大家的學習或工作具有一定的參考借鑒價值,需要的朋友可以參考下

相關閱讀:

MySQL8.0.20安裝教程及其安裝問題詳細教程  http://www.jfrwli.cn/article/132713.html

mysql8.0.20下載安裝及遇到的問題(圖文詳解)  http://www.jfrwli.cn/article/132715.html

CentOS7安裝Mysql8.0.20步驟:

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

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

1.創建mysql文件夾:

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

將下載的mysql包放在創建的MySQL文件夾內:

?
1
2
3
[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碼查看是否和官網上的相對應:

?
1
2
[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的包解壓得到幾個內安裝包:

?
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
[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

依次安裝順序時common,libs,libs-compat,client,server:

?
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
警告:mysql-community-common-8.0.20-1.el7.x86_64.rpm: 頭V3 DSA/SHA1 Signature, 密鑰 ID ********: NOKEY
準備中...  ################################# [100%]
正在升級/安裝...
 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
準備中...  ################################# [100%]
正在升級/安裝...
 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
準備中...  ################################# [100%]
正在升級/安裝...
 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
準備中...  ################################# [100%]
正在升級/安裝...
 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
準備中...  ################################# [100%]
正在升級/安裝...
 1:mysql-community-server-8.0.20-1.e################################# [100%]

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

?
1
lower_case_table_names=1

initialize初始化:

?
1
2
[root@localhost mysql]# mysqld --initialize
[root@localhost mysql]#

更改一下權限:

?
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
[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

啟動mysql服務看一下服務狀態,看Active這一行的狀態:

?
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
[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]#

查看數據庫初始的密碼:

?
1
2
3
[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

使用初始密碼登陸數據庫:后更改密碼:

?
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
[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>

到此可以正常登陸數據庫了,可以自行查找開啟遠程方式。

總結

到此這篇關于CentOS7版本安裝Mysql8.0.20版本數據庫的詳細教程的文章就介紹到這了,更多相關CentOS7安裝Mysql8.0數據庫內容請搜索服務器之家以前的文章或繼續瀏覽下面的相關文章希望大家以后多多支持服務器之家!

原文鏈接:https://blog.csdn.net/Insupport/article/details/106094088

延伸 · 閱讀

精彩推薦
Weibo Article 1 Weibo Article 2 Weibo Article 3 Weibo Article 4 Weibo Article 5 Weibo Article 6 Weibo Article 7 Weibo Article 8 Weibo Article 9 Weibo Article 10 Weibo Article 11 Weibo Article 12 Weibo Article 13 Weibo Article 14 Weibo Article 15 Weibo Article 16 Weibo Article 17 Weibo Article 18 Weibo Article 19 Weibo Article 20 Weibo Article 21 Weibo Article 22 Weibo Article 23 Weibo Article 24 Weibo Article 25 Weibo Article 26 Weibo Article 27 Weibo Article 28 Weibo Article 29 Weibo Article 30 Weibo Article 31 Weibo Article 32 Weibo Article 33 Weibo Article 34 Weibo Article 35 Weibo Article 36 Weibo Article 37 Weibo Article 38 Weibo Article 39 Weibo Article 40
主站蜘蛛池模板: 日韩国产片 | caoporn最新地址 | 国产精品区二区三区日本 | 精精国产xxxx视频在线观看 | 一区二区三区影视 | 亚洲天堂久久 | 免费中文字幕 | 国产a视频 | 亚洲自拍偷拍网 | 精品久久久久久久久久久下田 | 国产精品毛片一区二区三区 | 日韩高清中文字幕 | 中文字幕高清视频 | 久久精品久久综合 | 亚洲精品久久久久久久久久久久久 | 日韩欧美一区二区三区 | ww8888免费视频| 成人日韩在线观看 | 一色屋精品久久久久久久久久 | 日韩在线一区二区三区免费视频 | 电影91久久久 | 天堂中文视频在线观看 | 亚洲在线一区二区三区 | 在线国产一级片 | 欧美亚洲在线 | 久久香蕉国产 | 黄色影院在线观看 | 精品伊人| 国产美女www爽爽爽免费视频 | 免费看黄色片 | 国产99久久 | 国产精品久久久久久久久久久久 | 亚洲免费观看视频 | 黄色免费网站在线观看 | 国产激情 | 久久国产精品免费一区二区三区 | 一区二区三区四区国产 | 视频1区 | 精品久 | 欧美一级大片免费 | 日本狠狠干 |