In Ubuntu 18.04 installed MySQL 8

In Ubuntu 18.04 installed MySQL 8

Notes: The following command appears to #begin with, executed by root; to $begin with, executed by ordinary users; command behind //behalf comment.

Environmental Information

Ubuntu system information:

# lsb_release --all
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 18.04.3 LTS
Release:	18.04
Codename:	bionic

Adding MySQL APT repository

Download MySQL APT Repository , then add it to the list of software systems:

$ sudo dpkg --install /home//mk/Downloads/mysql-apt-config_0.8.14-1_all.deb
Selecting previously unselected package mysql-apt-config.
(Reading database ... 168087 files and directories currently installed.)
Preparing to unpack .../mysql-apt-config_0.8.14-1_all.deb ...
Unpacking mysql-apt-config (0.8.14-1) ...
Setting up mysql-apt-config (0.8.14-1) ...

Here Insert Picture Description
According to their needs configuration, select OK after confirmation prompt:

Warning: apt-key should not be used in scripts (called from postinst maintainerscript of the package mysql-apt-config)
OK

From MySQL APT repository update package information:

$ sudo apt-get update
Hit:1 http://mirrors.tuna.tsinghua.edu.cn/ubuntu bionic InRelease   
Get:2 http://mirrors.tuna.tsinghua.edu.cn/ubuntu bionic-security InRelease [88.7 kB]
Get:3 http://mirrors.tuna.tsinghua.edu.cn/ubuntu bionic-updates InRelease [88.7 kB]
Get:4 http://mirrors.tuna.tsinghua.edu.cn/ubuntu bionic-backports InRelease [74.6 kB]
Get:5 http://mirrors.tuna.tsinghua.edu.cn/ubuntu bionic-proposed InRelease [242 kB]
Get:6 http://mirrors.tuna.tsinghua.edu.cn/ubuntu bionic-security/main amd64 DEP-11 Metadata [38.5 kB]
Get:7 http://mirrors.tuna.tsinghua.edu.cn/ubuntu bionic-security/main DEP-11 48x48 Icons [17.6 kB]
Get:8 http://mirrors.tuna.tsinghua.edu.cn/ubuntu bionic-security/main DEP-11 64x64 Icons [41.5 kB]
Get:9 http://mirrors.tuna.tsinghua.edu.cn/ubuntu bionic-security/universe amd64 DEP-11 Metadata [42.1 kB]
Get:10 http://mirrors.tuna.tsinghua.edu.cn/ubuntu bionic-security/universe DEP-11 48x48 Icons [16.4 kB]
Get:11 http://mirrors.tuna.tsinghua.edu.cn/ubuntu bionic-security/universe DEP-11 64x64 Icons [111 kB]
Get:12 http://mirrors.tuna.tsinghua.edu.cn/ubuntu bionic-security/multiverse amd64 DEP-11 Metadata [2,464 B]
Get:13 http://mirrors.tuna.tsinghua.edu.cn/ubuntu bionic-updates/main amd64 DEP-11 Metadata [294 kB]
Get:14 http://mirrors.tuna.tsinghua.edu.cn/ubuntu bionic-updates/main DEP-11 48x48 Icons [73.8 kB]
Get:15 http://mirrors.tuna.tsinghua.edu.cn/ubuntu bionic-updates/main DEP-11 64x64 Icons [140 kB]
Get:16 http://mirrors.tuna.tsinghua.edu.cn/ubuntu bionic-updates/universe amd64 DEP-11 Metadata [264 kB]
Get:17 http://mirrors.tuna.tsinghua.edu.cn/ubuntu bionic-updates/universe DEP-11 48x48 Icons [197 kB]
Get:18 http://mirrors.tuna.tsinghua.edu.cn/ubuntu bionic-updates/universe DEP-11 64x64 Icons [445 kB]
Get:19 http://mirrors.tuna.tsinghua.edu.cn/ubuntu bionic-updates/multiverse amd64 DEP-11 Metadata [2,464 B]
Get:20 http://mirrors.tuna.tsinghua.edu.cn/ubuntu bionic-backports/universe amd64 DEP-11 Metadata [8,280 B]
Get:21 http://mirrors.tuna.tsinghua.edu.cn/ubuntu bionic-proposed/main amd64 DEP-11 Metadata [20.4 kB]
Get:22 http://mirrors.tuna.tsinghua.edu.cn/ubuntu bionic-proposed/main DEP-11 64x64 Icons [11.0 kB]
Get:23 http://mirrors.tuna.tsinghua.edu.cn/ubuntu bionic-proposed/universe amd64 DEP-11 Metadata [11.7 kB]
Hit:24 http://mirrors.aliyun.com/ubuntu bionic InRelease                       
Get:25 http://mirrors.aliyun.com/ubuntu bionic-security InRelease [88.7 kB]    
Get:26 http://mirrors.aliyun.com/ubuntu bionic-updates InRelease [88.7 kB]     
Get:27 http://mirrors.aliyun.com/ubuntu bionic-backports InRelease [74.6 kB]   
Get:28 http://mirrors.aliyun.com/ubuntu bionic-proposed InRelease [242 kB]     
Get:29 http://mirrors.aliyun.com/ubuntu bionic-security/main amd64 DEP-11 Metadata [38.5 kB]
Get:30 http://mirrors.aliyun.com/ubuntu bionic-security/main DEP-11 48x48 Icons [17.6 kB]
Get:31 http://mirrors.aliyun.com/ubuntu bionic-security/main DEP-11 64x64 Icons [41.5 kB]
Get:32 http://mirrors.aliyun.com/ubuntu bionic-security/universe amd64 DEP-11 Metadata [42.1 kB]
Get:33 http://mirrors.aliyun.com/ubuntu bionic-security/universe DEP-11 48x48 Icons [16.4 kB]
Get:34 http://mirrors.aliyun.com/ubuntu bionic-security/universe DEP-11 64x64 Icons [111 kB]
Get:35 http://mirrors.aliyun.com/ubuntu bionic-security/multiverse amd64 DEP-11 Metadata [2,464 B]
Get:36 http://mirrors.aliyun.com/ubuntu bionic-updates/main amd64 DEP-11 Metadata [294 kB]
Get:37 http://mirrors.aliyun.com/ubuntu bionic-updates/main DEP-11 48x48 Icons [73.8 kB]
Get:38 http://mirrors.aliyun.com/ubuntu bionic-updates/main DEP-11 64x64 Icons [140 kB]
Get:39 http://mirrors.aliyun.com/ubuntu bionic-updates/universe amd64 DEP-11 Metadata [264 kB]
Get:40 http://mirrors.aliyun.com/ubuntu bionic-updates/universe DEP-11 48x48 Icons [208 kB]
Get:41 http://mirrors.aliyun.com/ubuntu bionic-updates/universe DEP-11 64x64 Icons [456 kB]
Get:42 http://mirrors.aliyun.com/ubuntu bionic-updates/multiverse amd64 DEP-11 Metadata [2,464 B]
Get:43 http://mirrors.aliyun.com/ubuntu bionic-backports/universe amd64 DEP-11 Metadata [8,284 B]
Get:44 http://mirrors.aliyun.com/ubuntu bionic-proposed/main amd64 DEP-11 Metadata [20.5 kB]
Get:45 http://mirrors.aliyun.com/ubuntu bionic-proposed/universe amd64 DEP-11 Metadata [11.7 kB]
Get:46 http://mirrors.aliyun.com/ubuntu bionic-proposed/universe DEP-11 64x64 Icons [10.8 kB]
Get:47 http://repo.mysql.com/apt/ubuntu bionic InRelease [19.4 kB]                                  
Get:47 http://repo.mysql.com/apt/ubuntu bionic InRelease [19.4 kB]                                  
Get:48 http://repo.mysql.com/apt/ubuntu bionic/mysql-8.0 Sources [948 B]
Get:49 http://repo.mysql.com/apt/ubuntu bionic/mysql-apt-config amd64 Packages [566 B]
Get:50 http://repo.mysql.com/apt/ubuntu bionic/mysql-apt-config i386 Packages [566 B]
Get:51 http://repo.mysql.com/apt/ubuntu bionic/mysql-8.0 amd64 Packages [7,570 B]
Get:52 http://repo.mysql.com/apt/ubuntu bionic/mysql-8.0 i386 Packages [7,620 B]                    
Get:53 http://repo.mysql.com/apt/ubuntu bionic/mysql-tools amd64 Packages [4,294 B]                 
Get:54 http://repo.mysql.com/apt/ubuntu bionic/mysql-tools i386 Packages [3,694 B]                  
Fetched 4,519 kB in 53s (84.8 kB/s)                                                                 
Reading package lists... Done

Use APT to install MySQL

Install MySQL:

$ sudo apt-get install mysql-server
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  libmecab2 mecab-ipadic mecab-ipadic-utf8 mecab-utils mysql-client mysql-common
  mysql-community-client mysql-community-client-core mysql-community-server
  mysql-community-server-core
The following NEW packages will be installed:
  libmecab2 mecab-ipadic mecab-ipadic-utf8 mecab-utils mysql-client mysql-community-client
  mysql-community-client-core mysql-community-server mysql-community-server-core mysql-server
The following packages will be upgraded:
  mysql-common
1 upgraded, 10 newly installed, 0 to remove and 95 not upgraded.
Need to get 35.3 MB of archives.
After this operation, 255 MB of additional disk space will be used.
Do you want to continue? [Y/n] 

Enter yto continue:

Do you want to continue? [Y/n] y
Get:1 http://repo.mysql.com/apt/ubuntu bionic/mysql-8.0 amd64 mysql-common amd64 8.0.19-1ubuntu18.04 [94.6 kB]
Get:2 http://mirrors.aliyun.com/ubuntu bionic/universe amd64 libmecab2 amd64 0.996-5 [257 kB]       
Get:3 http://mirrors.aliyun.com/ubuntu bionic/universe amd64 mecab-utils amd64 0.996-5 [4,856 B]    
Get:4 http://mirrors.aliyun.com/ubuntu bionic/universe amd64 mecab-ipadic all 2.7.0-20070801+main-1 [12.1 MB]
Get:5 http://mirrors.aliyun.com/ubuntu bionic/universe amd64 mecab-ipadic-utf8 all 2.7.0-20070801+main-1 [3,522 B]
Get:6 http://repo.mysql.com/apt/ubuntu bionic/mysql-8.0 amd64 mysql-community-client-core amd64 8.0.19-1ubuntu18.04 [1,684 kB]
Get:7 http://repo.mysql.com/apt/ubuntu bionic/mysql-8.0 amd64 mysql-community-client amd64 8.0.19-1ubuntu18.04 [2,825 kB]
Get:7 http://repo.mysql.com/apt/ubuntu bionic/mysql-8.0 amd64 mysql-community-client amd64 8.0.19-1ubuntu18.04 [2,825 kB]
Get:7 http://repo.mysql.com/apt/ubuntu bionic/mysql-8.0 amd64 mysql-community-client amd64 8.0.19-1ubuntu18.04 [2,825 kB]
Get:7 http://repo.mysql.com/apt/ubuntu bionic/mysql-8.0 amd64 mysql-community-client amd64 8.0.19-1ubuntu18.04 [2,825 kB]
Get:7 http://repo.mysql.com/apt/ubuntu bionic/mysql-8.0 amd64 mysql-community-client amd64 8.0.19-1ubuntu18.04 [2,825 kB]
Get:7 http://repo.mysql.com/apt/ubuntu bionic/mysql-8.0 amd64 mysql-community-client amd64 8.0.19-1ubuntu18.04 [2,825 kB]
Get:7 http://repo.mysql.com/apt/ubuntu bionic/mysql-8.0 amd64 mysql-community-client amd64 8.0.19-1ubuntu18.04 [2,825 kB]
Get:7 http://repo.mysql.com/apt/ubuntu bionic/mysql-8.0 amd64 mysql-community-client amd64 8.0.19-1ubuntu18.04 [2,825 kB]
Get:7 http://repo.mysql.com/apt/ubuntu bionic/mysql-8.0 amd64 mysql-community-client amd64 8.0.19-1ubuntu18.04 [2,825 kB]
Get:7 http://repo.mysql.com/apt/ubuntu bionic/mysql-8.0 amd64 mysql-community-client amd64 8.0.19-1ubuntu18.04 [2,825 kB]
Get:7 http://repo.mysql.com/apt/ubuntu bionic/mysql-8.0 amd64 mysql-community-client amd64 8.0.19-1ubuntu18.04 [2,825 kB]
Get:7 http://repo.mysql.com/apt/ubuntu bionic/mysql-8.0 amd64 mysql-community-client amd64 8.0.19-1ubuntu18.04 [2,825 kB]
Get:7 http://repo.mysql.com/apt/ubuntu bionic/mysql-8.0 amd64 mysql-community-client amd64 8.0.19-1ubuntu18.04 [2,825 kB]
Get:7 http://repo.mysql.com/apt/ubuntu bionic/mysql-8.0 amd64 mysql-community-client amd64 8.0.19-1ubuntu18.04 [2,825 kB]
Get:7 http://repo.mysql.com/apt/ubuntu bionic/mysql-8.0 amd64 mysql-community-client amd64 8.0.19-1ubuntu18.04 [2,825 kB]
Get:7 http://repo.mysql.com/apt/ubuntu bionic/mysql-8.0 amd64 mysql-community-client amd64 8.0.19-1ubuntu18.04 [2,825 kB]
Get:7 http://repo.mysql.com/apt/ubuntu bionic/mysql-8.0 amd64 mysql-community-client amd64 8.0.19-1ubuntu18.04 [2,825 kB]
Get:7 http://repo.mysql.com/apt/ubuntu bionic/mysql-8.0 amd64 mysql-community-client amd64 8.0.19-1ubuntu18.04 [2,825 kB]
Get:7 http://repo.mysql.com/apt/ubuntu bionic/mysql-8.0 amd64 mysql-community-client amd64 8.0.19-1ubuntu18.04 [2,825 kB]
Get:7 http://repo.mysql.com/apt/ubuntu bionic/mysql-8.0 amd64 mysql-community-client amd64 8.0.19-1ubuntu18.04 [2,825 kB]
Get:7 http://repo.mysql.com/apt/ubuntu bionic/mysql-8.0 amd64 mysql-community-client amd64 8.0.19-1ubuntu18.04 [2,825 kB]
Get:7 http://repo.mysql.com/apt/ubuntu bionic/mysql-8.0 amd64 mysql-community-client amd64 8.0.19-1ubuntu18.04 [2,825 kB]
Get:8 http://repo.mysql.com/apt/ubuntu bionic/mysql-8.0 amd64 mysql-client amd64 8.0.19-1ubuntu18.04 [91.1 kB]
Get:9 http://repo.mysql.com/apt/ubuntu bionic/mysql-8.0 amd64 mysql-community-server-core amd64 8.0.19-1ubuntu18.04 [18.0 MB]
Get:9 http://repo.mysql.com/apt/ubuntu bionic/mysql-8.0 amd64 mysql-community-server-core amd64 8.0.19-1ubuntu18.04 [18.0 MB]
Get:9 http://repo.mysql.com/apt/ubuntu bionic/mysql-8.0 amd64 mysql-community-server-core amd64 8.0.19-1ubuntu18.04 [18.0 MB]
Get:9 http://repo.mysql.com/apt/ubuntu bionic/mysql-8.0 amd64 mysql-community-server-core amd64 8.0.19-1ubuntu18.04 [18.0 MB]
Get:9 http://repo.mysql.com/apt/ubuntu bionic/mysql-8.0 amd64 mysql-community-server-core amd64 8.0.19-1ubuntu18.04 [18.0 MB]
Get:9 http://repo.mysql.com/apt/ubuntu bionic/mysql-8.0 amd64 mysql-community-server-core amd64 8.0.19-1ubuntu18.04 [18.0 MB]
Get:9 http://repo.mysql.com/apt/ubuntu bionic/mysql-8.0 amd64 mysql-community-server-core amd64 8.0.19-1ubuntu18.04 [18.0 MB]
Get:9 http://repo.mysql.com/apt/ubuntu bionic/mysql-8.0 amd64 mysql-community-server-core amd64 8.0.19-1ubuntu18.04 [18.0 MB]
Get:9 http://repo.mysql.com/apt/ubuntu bionic/mysql-8.0 amd64 mysql-community-server-core amd64 8.0.19-1ubuntu18.04 [18.0 MB]
Get:9 http://repo.mysql.com/apt/ubuntu bionic/mysql-8.0 amd64 mysql-community-server-core amd64 8.0.19-1ubuntu18.04 [18.0 MB]
Get:9 http://repo.mysql.com/apt/ubuntu bionic/mysql-8.0 amd64 mysql-community-server-core amd64 8.0.19-1ubuntu18.04 [18.0 MB]
Get:9 http://repo.mysql.com/apt/ubuntu bionic/mysql-8.0 amd64 mysql-community-server-core amd64 8.0.19-1ubuntu18.04 [18.0 MB]
Err:9 http://repo.mysql.com/apt/ubuntu bionic/mysql-8.0 amd64 mysql-community-server-core amd64 8.0.19-1ubuntu18.04
  Connection failed [IP: 2.22.77.13 80]
Get:10 http://repo.mysql.com/apt/ubuntu bionic/mysql-8.0 amd64 mysql-community-server amd64 8.0.19-1ubuntu18.04 [102 kB]
Get:10 http://repo.mysql.com/apt/ubuntu bionic/mysql-8.0 amd64 mysql-community-server amd64 8.0.19-1ubuntu18.04 [102 kB]
Get:11 http://repo.mysql.com/apt/ubuntu bionic/mysql-8.0 amd64 mysql-server amd64 8.0.19-1ubuntu18.04 [91.1 kB]
Get:11 http://repo.mysql.com/apt/ubuntu bionic/mysql-8.0 amd64 mysql-server amd64 8.0.19-1ubuntu18.04 [91.1 kB]
Fetched 14.5 MB in 1h 2min 41s (3,855 B/s)                                     
E: Failed to fetch http://repo.mysql.com/apt/ubuntu/pool/mysql-8.0/m/mysql-community/mysql-community-server-core_8.0.19-1ubuntu18.04_amd64.deb  Connection failed [IP: 2.22.77.13 80]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

The installation fails, follow the prompts, updated once again:

$ sudo apt-get update 
Hit:1 http://mirrors.tuna.tsinghua.edu.cn/ubuntu bionic InRelease
Hit:2 http://mirrors.tuna.tsinghua.edu.cn/ubuntu bionic-security InRelease                          
Hit:3 http://mirrors.tuna.tsinghua.edu.cn/ubuntu bionic-updates InRelease                           
Hit:4 http://mirrors.tuna.tsinghua.edu.cn/ubuntu bionic-backports InRelease                         
Hit:5 http://mirrors.tuna.tsinghua.edu.cn/ubuntu bionic-proposed InRelease                          
Hit:6 http://repo.mysql.com/apt/ubuntu bionic InRelease                                       
Hit:7 http://mirrors.aliyun.com/ubuntu bionic InRelease             
Hit:8 http://mirrors.aliyun.com/ubuntu bionic-security InRelease                
Hit:9 http://mirrors.aliyun.com/ubuntu bionic-updates InRelease                 
Hit:10 http://mirrors.aliyun.com/ubuntu bionic-backports InRelease               
Hit:11 http://mirrors.aliyun.com/ubuntu bionic-proposed InRelease
Reading package lists... Done

Perform the installation again:

$ sudo apt-get install mysql-server
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  libmecab2 mecab-ipadic mecab-ipadic-utf8 mecab-utils mysql-client mysql-common
  mysql-community-client mysql-community-client-core mysql-community-server
  mysql-community-server-core
The following NEW packages will be installed:
  libmecab2 mecab-ipadic mecab-ipadic-utf8 mecab-utils mysql-client mysql-community-client
  mysql-community-client-core mysql-community-server mysql-community-server-core mysql-server
The following packages will be upgraded:
  mysql-common
1 upgraded, 10 newly installed, 0 to remove and 95 not upgraded.
Need to get 18.0 MB/35.3 MB of archives.
After this operation, 255 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://repo.mysql.com/apt/ubuntu bionic/mysql-8.0 amd64 mysql-community-server-core amd64 8.0.19-1ubuntu18.04 [18.0 MB]
81% [1 mysql-community-server-core 10.4 MB/18.0 MB 57%]                                                                                                         Fetched 16.8 MB in 1min 47s (157 kB/s)

Enter Password:
Here Insert Picture Description
Confirm Password:
Here Insert Picture Description
Tip:
Here Insert Picture DescriptionHere Insert Picture Description
Select compatible plug-5.x certification of:
Here Insert Picture Description

Preconfiguring packages ...
(Reading database ... 168092 files and directories currently installed.)
Preparing to unpack .../00-mysql-common_8.0.19-1ubuntu18.04_amd64.deb ...
Unpacking mysql-common (8.0.19-1ubuntu18.04) over (5.8+1.0.4) ...
Selecting previously unselected package mysql-community-client-core.
Preparing to unpack .../01-mysql-community-client-core_8.0.19-1ubuntu18.04_amd64.deb ...
Unpacking mysql-community-client-core (8.0.19-1ubuntu18.04) ...
Selecting previously unselected package mysql-community-client.
Preparing to unpack .../02-mysql-community-client_8.0.19-1ubuntu18.04_amd64.deb ...
Unpacking mysql-community-client (8.0.19-1ubuntu18.04) ...
Selecting previously unselected package mysql-client.
Preparing to unpack .../03-mysql-client_8.0.19-1ubuntu18.04_amd64.deb ...
Unpacking mysql-client (8.0.19-1ubuntu18.04) ...
Selecting previously unselected package libmecab2:amd64.
Preparing to unpack .../04-libmecab2_0.996-5_amd64.deb ...
Unpacking libmecab2:amd64 (0.996-5) ...
Selecting previously unselected package mysql-community-server-core.
Preparing to unpack .../05-mysql-community-server-core_8.0.19-1ubuntu18.04_amd64.deb ...
Unpacking mysql-community-server-core (8.0.19-1ubuntu18.04) ...
Selecting previously unselected package mysql-community-server.
Preparing to unpack .../06-mysql-community-server_8.0.19-1ubuntu18.04_amd64.deb ...
Unpacking mysql-community-server (8.0.19-1ubuntu18.04) ...
Selecting previously unselected package mecab-utils.
Preparing to unpack .../07-mecab-utils_0.996-5_amd64.deb ...
Unpacking mecab-utils (0.996-5) ...
Selecting previously unselected package mecab-ipadic.
Preparing to unpack .../08-mecab-ipadic_2.7.0-20070801+main-1_all.deb ...
Unpacking mecab-ipadic (2.7.0-20070801+main-1) ...
Selecting previously unselected package mecab-ipadic-utf8.
Preparing to unpack .../09-mecab-ipadic-utf8_2.7.0-20070801+main-1_all.deb ...
Unpacking mecab-ipadic-utf8 (2.7.0-20070801+main-1) ...
Selecting previously unselected package mysql-server.
Preparing to unpack .../10-mysql-server_8.0.19-1ubuntu18.04_amd64.deb ...
Unpacking mysql-server (8.0.19-1ubuntu18.04) ...
Setting up mysql-common (8.0.19-1ubuntu18.04) ...

Configuration file '/etc/mysql/conf.d/mysql.cnf'
 ==> Deleted (by you or by a script) since installation.
 ==> Package distributor has shipped an updated version.
   What would you like to do about it ?  Your options are:
    Y or I  : install the package maintainer's version
    N or O  : keep your currently-installed version
      D     : show the differences between the versions
      Z     : start a shell to examine the situation
 The default action is to keep your current version.
*** mysql.cnf (Y/I/N/O/D/Z) [default=N] ? 

Enter Yto continue:

*** mysql.cnf (Y/I/N/O/D/Z) [default=N] ? Y
Installing new version of config file /etc/mysql/conf.d/mysql.cnf ...

Configuration file '/etc/mysql/my.cnf.fallback'
 ==> Deleted (by you or by a script) since installation.
 ==> Package distributor has shipped an updated version.
   What would you like to do about it ?  Your options are:
    Y or I  : install the package maintainer's version
    N or O  : keep your currently-installed version
      D     : show the differences between the versions
      Z     : start a shell to examine the situation
 The default action is to keep your current version.
*** my.cnf.fallback (Y/I/N/O/D/Z) [default=N] ? 

Enter Yto continue:

*** my.cnf.fallback (Y/I/N/O/D/Z) [default=N] ? Y
Installing new version of config file /etc/mysql/my.cnf.fallback ...
update-alternatives: warning: forcing reinstallation of alternative /etc/mysql/my.cnf.fallback because link group my.cnf is broken
Setting up libmecab2:amd64 (0.996-5) ...
Setting up mysql-community-client-core (8.0.19-1ubuntu18.04) ...
Setting up mysql-community-server-core (8.0.19-1ubuntu18.04) ...
Setting up mecab-utils (0.996-5) ...
Setting up mysql-community-client (8.0.19-1ubuntu18.04) ...
Setting up mecab-ipadic (2.7.0-20070801+main-1) ...
Compiling IPA dictionary for Mecab.  This takes long time...
reading /usr/share/mecab/dic/ipadic/unk.def ... 40
emitting double-array: 100% |###########################################| 
/usr/share/mecab/dic/ipadic/model.def is not found. skipped.
reading /usr/share/mecab/dic/ipadic/Noun.name.csv ... 34202
reading /usr/share/mecab/dic/ipadic/Noun.adverbal.csv ... 795
reading /usr/share/mecab/dic/ipadic/Adverb.csv ... 3032
reading /usr/share/mecab/dic/ipadic/Prefix.csv ... 221
reading /usr/share/mecab/dic/ipadic/Noun.csv ... 60477
reading /usr/share/mecab/dic/ipadic/Auxil.csv ... 199
reading /usr/share/mecab/dic/ipadic/Verb.csv ... 130750
reading /usr/share/mecab/dic/ipadic/Noun.others.csv ... 151
reading /usr/share/mecab/dic/ipadic/Suffix.csv ... 1393
reading /usr/share/mecab/dic/ipadic/Postp.csv ... 146
reading /usr/share/mecab/dic/ipadic/Postp-col.csv ... 91
reading /usr/share/mecab/dic/ipadic/Symbol.csv ... 208
reading /usr/share/mecab/dic/ipadic/Noun.verbal.csv ... 12146
reading /usr/share/mecab/dic/ipadic/Filler.csv ... 19
reading /usr/share/mecab/dic/ipadic/Conjunction.csv ... 171
reading /usr/share/mecab/dic/ipadic/Noun.number.csv ... 42
reading /usr/share/mecab/dic/ipadic/Adnominal.csv ... 135
reading /usr/share/mecab/dic/ipadic/Noun.nai.csv ... 42
reading /usr/share/mecab/dic/ipadic/Noun.demonst.csv ... 120
reading /usr/share/mecab/dic/ipadic/Interjection.csv ... 252
reading /usr/share/mecab/dic/ipadic/Noun.place.csv ... 72999
reading /usr/share/mecab/dic/ipadic/Others.csv ... 2
reading /usr/share/mecab/dic/ipadic/Adj.csv ... 27210
reading /usr/share/mecab/dic/ipadic/Noun.adjv.csv ... 3328
reading /usr/share/mecab/dic/ipadic/Noun.proper.csv ... 27327
reading /usr/share/mecab/dic/ipadic/Noun.org.csv ... 16668
emitting double-array: 100% |###########################################| 
reading /usr/share/mecab/dic/ipadic/matrix.def ... 1316x1316
emitting matrix      : 100% |###########################################| 

done!
update-alternatives: using /var/lib/mecab/dic/ipadic to provide /var/lib/mecab/dic/debian (mecab-dictionary) in auto mode
Setting up mysql-client (8.0.19-1ubuntu18.04) ...
Setting up mecab-ipadic-utf8 (2.7.0-20070801+main-1) ...
Compiling IPA dictionary for Mecab.  This takes long time...
reading /usr/share/mecab/dic/ipadic/unk.def ... 40
emitting double-array: 100% |###########################################| 
/usr/share/mecab/dic/ipadic/model.def is not found. skipped.
reading /usr/share/mecab/dic/ipadic/Noun.name.csv ... 34202
reading /usr/share/mecab/dic/ipadic/Noun.adverbal.csv ... 795
reading /usr/share/mecab/dic/ipadic/Adverb.csv ... 3032
reading /usr/share/mecab/dic/ipadic/Prefix.csv ... 221
reading /usr/share/mecab/dic/ipadic/Noun.csv ... 60477
reading /usr/share/mecab/dic/ipadic/Auxil.csv ... 199
reading /usr/share/mecab/dic/ipadic/Verb.csv ... 130750
reading /usr/share/mecab/dic/ipadic/Noun.others.csv ... 151
reading /usr/share/mecab/dic/ipadic/Suffix.csv ... 1393
reading /usr/share/mecab/dic/ipadic/Postp.csv ... 146
reading /usr/share/mecab/dic/ipadic/Postp-col.csv ... 91
reading /usr/share/mecab/dic/ipadic/Symbol.csv ... 208
reading /usr/share/mecab/dic/ipadic/Noun.verbal.csv ... 12146
reading /usr/share/mecab/dic/ipadic/Filler.csv ... 19
reading /usr/share/mecab/dic/ipadic/Conjunction.csv ... 171
reading /usr/share/mecab/dic/ipadic/Noun.number.csv ... 42
reading /usr/share/mecab/dic/ipadic/Adnominal.csv ... 135
reading /usr/share/mecab/dic/ipadic/Noun.nai.csv ... 42
reading /usr/share/mecab/dic/ipadic/Noun.demonst.csv ... 120
reading /usr/share/mecab/dic/ipadic/Interjection.csv ... 252
reading /usr/share/mecab/dic/ipadic/Noun.place.csv ... 72999
reading /usr/share/mecab/dic/ipadic/Others.csv ... 2
reading /usr/share/mecab/dic/ipadic/Adj.csv ... 27210
reading /usr/share/mecab/dic/ipadic/Noun.adjv.csv ... 3328
reading /usr/share/mecab/dic/ipadic/Noun.proper.csv ... 27327
reading /usr/share/mecab/dic/ipadic/Noun.org.csv ... 16668
emitting double-array: 100% |###########################################| 
reading /usr/share/mecab/dic/ipadic/matrix.def ... 1316x1316
emitting matrix      : 100% |###########################################|

done!
update-alternatives: using /var/lib/mecab/dic/ipadic-utf8 to provide /var/lib/mecab/dic/debian (mecab-dictionary) in auto mode
Setting up mysql-community-server (8.0.19-1ubuntu18.04) ...
update-alternatives: using /etc/mysql/mysql.cnf to provide /etc/mysql/my.cnf (my.cnf) in auto mode
Created symlink /etc/systemd/system/multi-user.target.wants/mysql.service → /lib/systemd/system/mysql.service.
Setting up mysql-server (8.0.19-1ubuntu18.04) ...
Processing triggers for man-db (2.8.3-2ubuntu0.1) ...
Processing triggers for libc-bin (2.27-3ubuntu1) ...

Start and stop MySQL server

MySQL server to start automatically after the installation is complete, we can view the status of the MySQL server:

$ sudo service mysql status
[sudo] password for mk: 
● mysql.service - MySQL Community Server
   Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: en
   Active: active (running) since Mon 2020-02-10 15:36:29 CST; 3min 48s ago
     Docs: man:mysqld(8)
           http://dev.mysql.com/doc/refman/en/using-systemd.html
  Process: 9376 ExecStartPre=/usr/share/mysql-8.0/mysql-systemd-start pre (code=
 Main PID: 9415 (mysqld)
   Status: "Server is operational"
    Tasks: 38 (limit: 4915)
   CGroup: /system.slice/mysql.service
           └─9415 /usr/sbin/mysqld

2月 10 15:36:26 mk-Lenovo-Y430P systemd[1]: Starting MySQL Community Server...
2月 10 15:36:29 mk-Lenovo-Y430P systemd[1]: Started MySQL Community Server.

Stop MySQL server with the following command:

$ sudo service mysql stop

Start the MySQL server with the following command:

$ sudo service mysql start

View version information:

$ mysql --version
mysql  Ver 8.0.19 for Linux on x86_64 (MySQL Community Server - GPL)

MySQL connection in the machine:

$ mysql -u root -p
Enter password: 
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 10
Server version: 8.0.19 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.

reference

Ubuntu 18 installation MySQL8.0

Ubuntu18.04 installation MySQL8.0

Steps for a Fresh Installation of MySQL

Published 55 original articles · won praise 0 · Views 3170

Guess you like

Origin blog.csdn.net/qq_29761395/article/details/104249924