学习笔记-MySQL数据库-Ubuntu中用yum安装mysql-server
Ubuntu中用yum安装mysql-server
apt install mysql-server
1 [15:17:15 root@ubuntu2004 ~]#apt install mysql-server 2 Reading package lists... Done 3 Building dependency tree 4 Reading state information... Done 5 The following packages were automatically installed and are no longer required: 6 linux-headers-5.4.0-60 linux-headers-5.4.0-60-generic linux-image-5.4.0-60-generic linux-modules-5.4.0-60-generic 7 linux-modules-extra-5.4.0-60-generic 8 Use 'apt autoremove' to remove them. 9 The following additional packages will be installed: 10 libcgi-fast-perl libcgi-pm-perl libencode-locale-perl libevent-core-2.1-7 libevent-pthreads-2.1-7 libfcgi-perl libhtml-parser-perl 11 libhtml-tagset-perl libhtml-template-perl libhttp-date-perl libhttp-message-perl libio-html-perl liblwp-mediatypes-perl libmecab2 12 libtimedate-perl liburi-perl mecab-ipadic mecab-ipadic-utf8 mecab-utils mysql-client-8.0 mysql-client-core-8.0 mysql-common 13 mysql-server-8.0 mysql-server-core-8.0 14 Suggested packages: 15 libdata-dump-perl libipc-sharedcache-perl libwww-perl mailx tinyca 16 The following NEW packages will be installed: 17 libcgi-fast-perl libcgi-pm-perl libencode-locale-perl libevent-core-2.1-7 libevent-pthreads-2.1-7 libfcgi-perl libhtml-parser-perl 18 libhtml-tagset-perl libhtml-template-perl libhttp-date-perl libhttp-message-perl libio-html-perl liblwp-mediatypes-perl libmecab2 19 libtimedate-perl liburi-perl mecab-ipadic mecab-ipadic-utf8 mecab-utils mysql-client-8.0 mysql-client-core-8.0 mysql-common 20 mysql-server mysql-server-8.0 mysql-server-core-8.0 21 0 upgraded, 25 newly installed, 0 to remove and 94 not upgraded. 22 Need to get 30.7 MB of archives. 23 After this operation, 249 MB of additional disk space will be used. 24 Do you want to continue? [Y/n] y 25 Get:1 https://mirrors.tuna.tsinghua.edu.cn/ubuntu focal/main amd64 mysql-common all 5.8+1.0.5ubuntu2 [7,496 B] 26 Get:2 https://mirrors.tuna.tsinghua.edu.cn/ubuntu focal-updates/main amd64 mysql-client-core-8.0 amd64 8.0.22-0ubuntu0.20.04.3 [4,200 kB] 27 Get:3 https://mirrors.tuna.tsinghua.edu.cn/ubuntu focal-updates/main amd64 mysql-client-8.0 amd64 8.0.22-0ubuntu0.20.04.3 [22.0 kB] 28 Get:4 https://mirrors.tuna.tsinghua.edu.cn/ubuntu focal/main amd64 libevent-core-2.1-7 amd64 2.1.11-stable-1 [89.1 kB] 29 Get:5 https://mirrors.tuna.tsinghua.edu.cn/ubuntu focal/main amd64 libevent-pthreads-2.1-7 amd64 2.1.11-stable-1 [7,372 B] 30 Get:6 https://mirrors.tuna.tsinghua.edu.cn/ubuntu focal/main amd64 libmecab2 amd64 0.996-10build1 [233 kB] 31 Get:7 https://mirrors.tuna.tsinghua.edu.cn/ubuntu focal-updates/main amd64 mysql-server-core-8.0 amd64 8.0.22-0ubuntu0.20.04.3 [17.5 MB] 32 Get:8 https://mirrors.tuna.tsinghua.edu.cn/ubuntu focal-updates/main amd64 mysql-server-8.0 amd64 8.0.22-0ubuntu0.20.04.3 [1,261 kB] 33 Get:9 https://mirrors.tuna.tsinghua.edu.cn/ubuntu focal/main amd64 libhtml-tagset-perl all 3.20-4 [12.5 kB] 34 Get:10 https://mirrors.tuna.tsinghua.edu.cn/ubuntu focal/main amd64 liburi-perl all 1.76-2 [77.5 kB] 35 Get:11 https://mirrors.tuna.tsinghua.edu.cn/ubuntu focal/main amd64 libhtml-parser-perl amd64 3.72-5 [86.3 kB] 36 Get:12 https://mirrors.tuna.tsinghua.edu.cn/ubuntu focal/main amd64 libcgi-pm-perl all 4.46-1 [186 kB] 37 Get:13 https://mirrors.tuna.tsinghua.edu.cn/ubuntu focal/main amd64 libfcgi-perl amd64 0.79-1 [33.1 kB] 38 Get:14 https://mirrors.tuna.tsinghua.edu.cn/ubuntu focal/main amd64 libcgi-fast-perl all 1:2.15-1 [10.5 kB] 39 Get:15 https://mirrors.tuna.tsinghua.edu.cn/ubuntu focal/main amd64 libencode-locale-perl all 1.05-1 [12.3 kB] 40 Get:16 https://mirrors.tuna.tsinghua.edu.cn/ubuntu focal/main amd64 libhtml-template-perl all 2.97-1 [59.0 kB] 41 Get:17 https://mirrors.tuna.tsinghua.edu.cn/ubuntu focal/main amd64 libtimedate-perl all 2.3200-1 [34.0 kB] 42 Get:18 https://mirrors.tuna.tsinghua.edu.cn/ubuntu focal/main amd64 libhttp-date-perl all 6.05-1 [9,920 B] 43 Get:19 https://mirrors.tuna.tsinghua.edu.cn/ubuntu focal/main amd64 libio-html-perl all 1.001-1 [14.9 kB] 44 Get:20 https://mirrors.tuna.tsinghua.edu.cn/ubuntu focal/main amd64 liblwp-mediatypes-perl all 6.04-1 [19.5 kB] 45 Get:21 https://mirrors.tuna.tsinghua.edu.cn/ubuntu focal/main amd64 libhttp-message-perl all 6.22-1 [76.1 kB] 46 Get:22 https://mirrors.tuna.tsinghua.edu.cn/ubuntu focal/main amd64 mecab-utils amd64 0.996-10build1 [4,912 B] 47 Get:23 https://mirrors.tuna.tsinghua.edu.cn/ubuntu focal/main amd64 mecab-ipadic all 2.7.0-20070801+main-2.1 [6,714 kB] 48 Get:24 https://mirrors.tuna.tsinghua.edu.cn/ubuntu focal/main amd64 mecab-ipadic-utf8 all 2.7.0-20070801+main-2.1 [4,380 B] 49 Get:25 https://mirrors.tuna.tsinghua.edu.cn/ubuntu focal-updates/main amd64 mysql-server all 8.0.22-0ubuntu0.20.04.3 [9,548 B] 50 Fetched 30.7 MB in 38s (811 kB/s) 51 Preconfiguring packages ... 52 Selecting previously unselected package mysql-common. 53 (Reading database ... 144336 files and directories currently installed.) 54 Preparing to unpack .../0-mysql-common_5.8+1.0.5ubuntu2_all.deb ... 55 Unpacking mysql-common (5.8+1.0.5ubuntu2) ... 56 Selecting previously unselected package mysql-client-core-8.0. 57 Preparing to unpack .../1-mysql-client-core-8.0_8.0.22-0ubuntu0.20.04.3_amd64.deb ... 58 Unpacking mysql-client-core-8.0 (8.0.22-0ubuntu0.20.04.3) ... 59 Selecting previously unselected package mysql-client-8.0. 60 Preparing to unpack .../2-mysql-client-8.0_8.0.22-0ubuntu0.20.04.3_amd64.deb ... 61 Unpacking mysql-client-8.0 (8.0.22-0ubuntu0.20.04.3) ... 62 Selecting previously unselected package libevent-core-2.1-7:amd64. 63 Preparing to unpack .../3-libevent-core-2.1-7_2.1.11-stable-1_amd64.deb ... 64 Unpacking libevent-core-2.1-7:amd64 (2.1.11-stable-1) ... 65 Selecting previously unselected package libevent-pthreads-2.1-7:amd64. 66 Preparing to unpack .../4-libevent-pthreads-2.1-7_2.1.11-stable-1_amd64.deb ... 67 Unpacking libevent-pthreads-2.1-7:amd64 (2.1.11-stable-1) ... 68 Selecting previously unselected package libmecab2:amd64. 69 Preparing to unpack .../5-libmecab2_0.996-10build1_amd64.deb ... 70 Unpacking libmecab2:amd64 (0.996-10build1) ... 71 Selecting previously unselected package mysql-server-core-8.0. 72 Preparing to unpack .../6-mysql-server-core-8.0_8.0.22-0ubuntu0.20.04.3_amd64.deb ... 73 Unpacking mysql-server-core-8.0 (8.0.22-0ubuntu0.20.04.3) ... 74 Setting up mysql-common (5.8+1.0.5ubuntu2) ... 75 update-alternatives: using /etc/mysql/my.cnf.fallback to provide /etc/mysql/my.cnf (my.cnf) in auto mode 76 Selecting previously unselected package mysql-server-8.0. 77 (Reading database ... 144552 files and directories currently installed.) 78 Preparing to unpack .../00-mysql-server-8.0_8.0.22-0ubuntu0.20.04.3_amd64.deb ... 79 Unpacking mysql-server-8.0 (8.0.22-0ubuntu0.20.04.3) ... 80 Selecting previously unselected package libhtml-tagset-perl. 81 Preparing to unpack .../01-libhtml-tagset-perl_3.20-4_all.deb ... 82 Unpacking libhtml-tagset-perl (3.20-4) ... 83 Selecting previously unselected package liburi-perl. 84 Preparing to unpack .../02-liburi-perl_1.76-2_all.deb ... 85 Unpacking liburi-perl (1.76-2) ... 86 Selecting previously unselected package libhtml-parser-perl. 87 Preparing to unpack .../03-libhtml-parser-perl_3.72-5_amd64.deb ... 88 Unpacking libhtml-parser-perl (3.72-5) ... 89 Selecting previously unselected package libcgi-pm-perl. 90 Preparing to unpack .../04-libcgi-pm-perl_4.46-1_all.deb ... 91 Unpacking libcgi-pm-perl (4.46-1) ... 92 Selecting previously unselected package libfcgi-perl. 93 Preparing to unpack .../05-libfcgi-perl_0.79-1_amd64.deb ... 94 Unpacking libfcgi-perl (0.79-1) ... 95 Selecting previously unselected package libcgi-fast-perl. 96 Preparing to unpack .../06-libcgi-fast-perl_1%3a2.15-1_all.deb ... 97 Unpacking libcgi-fast-perl (1:2.15-1) ... 98 Selecting previously unselected package libencode-locale-perl. 99 Preparing to unpack .../07-libencode-locale-perl_1.05-1_all.deb ... 100 Unpacking libencode-locale-perl (1.05-1) ... 101 Selecting previously unselected package libhtml-template-perl. 102 Preparing to unpack .../08-libhtml-template-perl_2.97-1_all.deb ... 103 Unpacking libhtml-template-perl (2.97-1) ... 104 Selecting previously unselected package libtimedate-perl. 105 Preparing to unpack .../09-libtimedate-perl_2.3200-1_all.deb ... 106 Unpacking libtimedate-perl (2.3200-1) ... 107 Selecting previously unselected package libhttp-date-perl. 108 Preparing to unpack .../10-libhttp-date-perl_6.05-1_all.deb ... 109 Unpacking libhttp-date-perl (6.05-1) ... 110 Selecting previously unselected package libio-html-perl. 111 Preparing to unpack .../11-libio-html-perl_1.001-1_all.deb ... 112 Unpacking libio-html-perl (1.001-1) ... 113 Selecting previously unselected package liblwp-mediatypes-perl. 114 Preparing to unpack .../12-liblwp-mediatypes-perl_6.04-1_all.deb ... 115 Unpacking liblwp-mediatypes-perl (6.04-1) ... 116 Selecting previously unselected package libhttp-message-perl. 117 Preparing to unpack .../13-libhttp-message-perl_6.22-1_all.deb ... 118 Unpacking libhttp-message-perl (6.22-1) ... 119 Selecting previously unselected package mecab-utils. 120 Preparing to unpack .../14-mecab-utils_0.996-10build1_amd64.deb ... 121 Unpacking mecab-utils (0.996-10build1) ... 122 Selecting previously unselected package mecab-ipadic. 123 Preparing to unpack .../15-mecab-ipadic_2.7.0-20070801+main-2.1_all.deb ... 124 Unpacking mecab-ipadic (2.7.0-20070801+main-2.1) ... 125 Selecting previously unselected package mecab-ipadic-utf8. 126 Preparing to unpack .../16-mecab-ipadic-utf8_2.7.0-20070801+main-2.1_all.deb ... 127 Unpacking mecab-ipadic-utf8 (2.7.0-20070801+main-2.1) ... 128 Selecting previously unselected package mysql-server. 129 Preparing to unpack .../17-mysql-server_8.0.22-0ubuntu0.20.04.3_all.deb ... 130 Unpacking mysql-server (8.0.22-0ubuntu0.20.04.3) ... 131 Setting up libmecab2:amd64 (0.996-10build1) ... 132 Setting up mysql-client-core-8.0 (8.0.22-0ubuntu0.20.04.3) ... 133 Setting up libhtml-tagset-perl (3.20-4) ... 134 Setting up liblwp-mediatypes-perl (6.04-1) ... 135 Setting up libencode-locale-perl (1.05-1) ... 136 Setting up mecab-utils (0.996-10build1) ... 137 Setting up libevent-core-2.1-7:amd64 (2.1.11-stable-1) ... 138 Setting up libio-html-perl (1.001-1) ... 139 Setting up libtimedate-perl (2.3200-1) ... 140 Setting up mysql-client-8.0 (8.0.22-0ubuntu0.20.04.3) ... 141 Setting up libfcgi-perl (0.79-1) ... 142 Setting up liburi-perl (1.76-2) ... 143 Setting up libevent-pthreads-2.1-7:amd64 (2.1.11-stable-1) ... 144 Setting up libhttp-date-perl (6.05-1) ... 145 Setting up mecab-ipadic (2.7.0-20070801+main-2.1) ... 146 Compiling IPA dictionary for Mecab. This takes long time... 147 reading /usr/share/mecab/dic/ipadic/unk.def ... 40 148 emitting double-array: 100% |###########################################| 149 /usr/share/mecab/dic/ipadic/model.def is not found. skipped. 150 reading /usr/share/mecab/dic/ipadic/Postp-col.csv ... 91 151 reading /usr/share/mecab/dic/ipadic/Filler.csv ... 19 152 reading /usr/share/mecab/dic/ipadic/Symbol.csv ... 208 153 reading /usr/share/mecab/dic/ipadic/Adj.csv ... 27210 154 reading /usr/share/mecab/dic/ipadic/Noun.demonst.csv ... 120 155 reading /usr/share/mecab/dic/ipadic/Others.csv ... 2 156 reading /usr/share/mecab/dic/ipadic/Noun.csv ... 60477 157 reading /usr/share/mecab/dic/ipadic/Prefix.csv ... 221 158 reading /usr/share/mecab/dic/ipadic/Noun.name.csv ... 34202 159 reading /usr/share/mecab/dic/ipadic/Auxil.csv ... 199 160 reading /usr/share/mecab/dic/ipadic/Suffix.csv ... 1393 161 reading /usr/share/mecab/dic/ipadic/Verb.csv ... 130750 162 reading /usr/share/mecab/dic/ipadic/Noun.proper.csv ... 27328 163 reading /usr/share/mecab/dic/ipadic/Noun.org.csv ... 16668 164 reading /usr/share/mecab/dic/ipadic/Conjunction.csv ... 171 165 reading /usr/share/mecab/dic/ipadic/Noun.adjv.csv ... 3328 166 reading /usr/share/mecab/dic/ipadic/Noun.nai.csv ... 42 167 reading /usr/share/mecab/dic/ipadic/Noun.adverbal.csv ... 795 168 reading /usr/share/mecab/dic/ipadic/Noun.others.csv ... 151 169 reading /usr/share/mecab/dic/ipadic/Noun.place.csv ... 72999 170 reading /usr/share/mecab/dic/ipadic/Noun.verbal.csv ... 12146 171 reading /usr/share/mecab/dic/ipadic/Interjection.csv ... 252 172 reading /usr/share/mecab/dic/ipadic/Adnominal.csv ... 135 173 reading /usr/share/mecab/dic/ipadic/Postp.csv ... 146 174 reading /usr/share/mecab/dic/ipadic/Adverb.csv ... 3032 175 reading /usr/share/mecab/dic/ipadic/Noun.number.csv ... 42 176 emitting double-array: 100% |###########################################| 177 reading /usr/share/mecab/dic/ipadic/matrix.def ... 1316x1316 178 emitting matrix : 100% |###########################################| 179 180 done! 181 update-alternatives: using /var/lib/mecab/dic/ipadic to provide /var/lib/mecab/dic/debian (mecab-dictionary) in auto mode 182 Setting up mysql-server-core-8.0 (8.0.22-0ubuntu0.20.04.3) ... 183 Setting up mecab-ipadic-utf8 (2.7.0-20070801+main-2.1) ... 184 Compiling IPA dictionary for Mecab. This takes long time... 185 reading /usr/share/mecab/dic/ipadic/unk.def ... 40 186 emitting double-array: 100% |###########################################| 187 /usr/share/mecab/dic/ipadic/model.def is not found. skipped. 188 reading /usr/share/mecab/dic/ipadic/Postp-col.csv ... 91 189 reading /usr/share/mecab/dic/ipadic/Filler.csv ... 19 190 reading /usr/share/mecab/dic/ipadic/Symbol.csv ... 208 191 reading /usr/share/mecab/dic/ipadic/Adj.csv ... 27210 192 reading /usr/share/mecab/dic/ipadic/Noun.demonst.csv ... 120 193 reading /usr/share/mecab/dic/ipadic/Others.csv ... 2 194 reading /usr/share/mecab/dic/ipadic/Noun.csv ... 60477 195 reading /usr/share/mecab/dic/ipadic/Prefix.csv ... 221 196 reading /usr/share/mecab/dic/ipadic/Noun.name.csv ... 34202 197 reading /usr/share/mecab/dic/ipadic/Auxil.csv ... 199 198 reading /usr/share/mecab/dic/ipadic/Suffix.csv ... 1393 199 reading /usr/share/mecab/dic/ipadic/Verb.csv ... 130750 200 reading /usr/share/mecab/dic/ipadic/Noun.proper.csv ... 27328 201 reading /usr/share/mecab/dic/ipadic/Noun.org.csv ... 16668 202 reading /usr/share/mecab/dic/ipadic/Conjunction.csv ... 171 203 reading /usr/share/mecab/dic/ipadic/Noun.adjv.csv ... 3328 204 reading /usr/share/mecab/dic/ipadic/Noun.nai.csv ... 42 205 reading /usr/share/mecab/dic/ipadic/Noun.adverbal.csv ... 795 206 reading /usr/share/mecab/dic/ipadic/Noun.others.csv ... 151 207 reading /usr/share/mecab/dic/ipadic/Noun.place.csv ... 72999 208 reading /usr/share/mecab/dic/ipadic/Noun.verbal.csv ... 12146 209 reading /usr/share/mecab/dic/ipadic/Interjection.csv ... 252 210 reading /usr/share/mecab/dic/ipadic/Adnominal.csv ... 135 211 reading /usr/share/mecab/dic/ipadic/Postp.csv ... 146 212 reading /usr/share/mecab/dic/ipadic/Adverb.csv ... 3032 213 reading /usr/share/mecab/dic/ipadic/Noun.number.csv ... 42 214 emitting double-array: 100% |###########################################| 215 reading /usr/share/mecab/dic/ipadic/matrix.def ... 1316x1316 216 emitting matrix : 100% |###########################################| 217 218 done! 219 update-alternatives: using /var/lib/mecab/dic/ipadic-utf8 to provide /var/lib/mecab/dic/debian (mecab-dictionary) in auto mode 220 Setting up libhtml-parser-perl (3.72-5) ... 221 Setting up libhttp-message-perl (6.22-1) ... 222 Setting up mysql-server-8.0 (8.0.22-0ubuntu0.20.04.3) ... 223 update-alternatives: using /etc/mysql/mysql.cnf to provide /etc/mysql/my.cnf (my.cnf) in auto mode 224 Renaming removed key_buffer and myisam-recover options (if present) 225 mysqld will log errors to /var/log/mysql/error.log 226 mysqld is running as pid 19810 227 Created symlink /etc/systemd/system/multi-user.target.wants/mysql.service → /lib/systemd/system/mysql.service. 228 Setting up libcgi-pm-perl (4.46-1) ... 229 Setting up libhtml-template-perl (2.97-1) ... 230 Setting up mysql-server (8.0.22-0ubuntu0.20.04.3) ... 231 Setting up libcgi-fast-perl (1:2.15-1) ... 232 Processing triggers for systemd (245.4-4ubuntu3.2) ... 233 Processing triggers for man-db (2.9.1-1) ... 234 Processing triggers for libc-bin (2.31-0ubuntu9) ...
验证一下是否安装完成
1 [15:58:33 root@ubuntu2004 ~]#id mysql 2 uid=113(mysql) gid=118(mysql) groups=118(mysql) 3 [16:02:47 root@ubuntu2004 ~]#