ubuntu20 install MySQL 5.7.32 records
installing command records:
nanzhan@nanzhan-VirtualBox:~/dev_pros/mysql_5$ wget https://cdn.mysql.com/archives/mysql-5.7/mysql-server_5.7.32-1ubuntu18.04_amd64.deb-bundle.tar
nanzhan@nanzhan-VirtualBox:~/dev_pros/mysql_5$ tar -xvf mysql-server_5.7.32-1ubuntu18.04_amd64.deb-bundle.tar
nanzhan@nanzhan-VirtualBox:~/dev_pros/mysql_5$ ll
total 311140
drwxrwxr-x 2 nanzhan nanzhan 4096 3月 24 22:12 ./
drwxrwxr-x 3 nanzhan nanzhan 4096 3月 24 22:06 ../
-rw-r--r-- 1 nanzhan nanzhan 1584336 9月 23 2020 libmysqlclient20_5.7.32-1ubuntu18.04_amd64.deb
-rw-r--r-- 1 nanzhan nanzhan 2142044 9月 23 2020 libmysqlclient-dev_5.7.32-1ubuntu18.04_amd64.deb
-rw-r--r-- 1 nanzhan nanzhan 19058928 9月 23 2020 libmysqld-dev_5.7.32-1ubuntu18.04_amd64.deb
-rw-r--r-- 1 nanzhan nanzhan 67204 9月 23 2020 mysql-client_5.7.32-1ubuntu18.04_amd64.deb
-rw-r--r-- 1 nanzhan nanzhan 70520 9月 23 2020 mysql-common_5.7.32-1ubuntu18.04_amd64.deb
-rw-r--r-- 1 nanzhan nanzhan 14364004 9月 23 2020 mysql-community-client_5.7.32-1ubuntu18.04_amd64.deb
-rw-r--r-- 1 nanzhan nanzhan 36381584 9月 23 2020 mysql-community-server_5.7.32-1ubuntu18.04_amd64.deb
-rw-r--r-- 1 nanzhan nanzhan 53075376 9月 23 2020 mysql-community-source_5.7.32-1ubuntu18.04_amd64.deb
-rw-r--r-- 1 nanzhan nanzhan 32402392 9月 23 2020 mysql-community-test_5.7.32-1ubuntu18.04_amd64.deb
-rw-r--r-- 1 nanzhan nanzhan 67204 9月 23 2020 mysql-server_5.7.32-1ubuntu18.04_amd64.deb
-rw-r--r-- 1 root root 159293440 9月 25 2020 mysql-server_5.7.32-1ubuntu18.04_amd64.deb-bundle.tar
-rw-r--r-- 1 nanzhan nanzhan 67212 9月 23 2020 mysql-testsuite_5.7.32-1ubuntu18.04_amd64.deb
nanzhan@nanzhan-VirtualBox:~/dev_pros/mysql_5$ sudo dpkg -i mysql-common_5.7.32-1ubuntu18.04_amd64.deb
dpkg: warning: downgrading mysql-common from 5.8+1.0.5ubuntu2 to 5.7.32-1ubuntu18.04
(Reading database ... 180258 files and directories currently installed.)
Preparing to unpack mysql-common_5.7.32-1ubuntu18.04_amd64.deb ...
Unpacking mysql-common (5.7.32-1ubuntu18.04) over (5.8+1.0.5ubuntu2) ...
Setting up mysql-common (5.7.32-1ubuntu18.04) ...
Installing new version of config file /etc/mysql/conf.d/mysql.cnf ...
Installing new version of config file /etc/mysql/my.cnf.fallback ...
nanzhan@nanzhan-VirtualBox:~/dev_pros/mysql_5$ sudo dpkg -i libmysqlclient20_5.7.32-1ubuntu18.04_amd64.deb
Selecting previously unselected package libmysqlclient20:amd64.
(Reading database ... 180260 files and directories currently installed.)
Preparing to unpack libmysqlclient20_5.7.32-1ubuntu18.04_amd64.deb ...
Unpacking libmysqlclient20:amd64 (5.7.32-1ubuntu18.04) ...
Setting up libmysqlclient20:amd64 (5.7.32-1ubuntu18.04) ...
Processing triggers for libc-bin (2.31-0ubuntu9.2) ...
nanzhan@nanzhan-VirtualBox:~/dev_pros/mysql_5$ sudo dpkg -i libmysqlclient-dev_5.7.32-1ubuntu18.04_amd64.deb
Selecting previously unselected package libmysqlclient-dev.
(Reading database ... 180268 files and directories currently installed.)
Preparing to unpack libmysqlclient-dev_5.7.32-1ubuntu18.04_amd64.deb ...
Unpacking libmysqlclient-dev (5.7.32-1ubuntu18.04) ...
Setting up libmysqlclient-dev (5.7.32-1ubuntu18.04) ...
Processing triggers for man-db (2.9.1-1) ...
nanzhan@nanzhan-VirtualBox:~/dev_pros/mysql_5$ sudo dpkg -i libmysqld-dev_5.7.32-1ubuntu18.04_amd64.deb
Selecting previously unselected package libmysqld-dev.
(Reading database ... 180388 files and directories currently installed.)
Preparing to unpack libmysqld-dev_5.7.32-1ubuntu18.04_amd64.deb ...
Unpacking libmysqld-dev (5.7.32-1ubuntu18.04) ...
Setting up libmysqld-dev (5.7.32-1ubuntu18.04) ...
nanzhan@nanzhan-VirtualBox:~/dev_pros/mysql_5$ sudo dpkg -i mysql-community-client_5.7.32-1ubuntu18.04_amd64.deb
Selecting previously unselected package mysql-community-client.
(Reading database ... 180396 files and directories currently installed.)
Preparing to unpack mysql-community-client_5.7.32-1ubuntu18.04_amd64.deb ...
Unpacking mysql-community-client (5.7.32-1ubuntu18.04) ...
dpkg: dependency problems prevent configuration of mysql-community-client:
mysql-community-client depends on libaio1 (>= 0.3.93); however:
Package libaio1 is not installed.
mysql-community-client depends on libtinfo5 (>= 6); however:
Package libtinfo5 is not installed.
dpkg: error processing package mysql-community-client (--install):
dependency problems - leaving unconfigured
Processing triggers for man-db (2.9.1-1) ...
Errors were encountered while processing:
mysql-community-client
nanzhan@nanzhan-VirtualBox:~/dev_pros/mysql_5$ sudo dpkg -i mysql-community-client_5.7.32-1ubuntu18.04_amd64.deb
(Reading database ... 180453 files and directories currently installed.)
Preparing to unpack mysql-community-client_5.7.32-1ubuntu18.04_amd64.deb ...
Unpacking mysql-community-client (5.7.32-1ubuntu18.04) over (5.7.32-1ubuntu18.04) ...
dpkg: dependency problems prevent configuration of mysql-community-client:
mysql-community-client depends on libaio1 (>= 0.3.93); however:
Package libaio1 is not installed.
mysql-community-client depends on libtinfo5 (>= 6); however:
Package libtinfo5 is not installed.
dpkg: error processing package mysql-community-client (--install):
dependency problems - leaving unconfigured
Processing triggers for man-db (2.9.1-1) ...
Errors were encountered while processing:
mysql-community-client
nanzhan@nanzhan-VirtualBox:~/dev_pros/mysql_5$ sudo dpkg -i mysql-community-client_5.7.32-1ubuntu18.04_amd64.deb
(Reading database ... 180465 files and directories currently installed.)
Preparing to unpack mysql-community-client_5.7.32-1ubuntu18.04_amd64.deb ...
Unpacking mysql-community-client (5.7.32-1ubuntu18.04) over (5.7.32-1ubuntu18.04) ...
Setting up mysql-community-client (5.7.32-1ubuntu18.04) ...
Processing triggers for man-db (2.9.1-1) ...
nanzhan@nanzhan-VirtualBox:~/dev_pros/mysql_5$ sudo dpkg -i mysql-client_5.7.32-1ubuntu18.04_amd64.deb
Selecting previously unselected package mysql-client.
(Reading database ... 180465 files and directories currently installed.)
Preparing to unpack mysql-client_5.7.32-1ubuntu18.04_amd64.deb ...
Unpacking mysql-client (5.7.32-1ubuntu18.04) ...
Setting up mysql-client (5.7.32-1ubuntu18.04) ...
nanzhan@nanzhan-VirtualBox:~/dev_pros/mysql_5$
nanzhan@nanzhan-VirtualBox:~/dev_pros/mysql_5$
nanzhan@nanzhan-VirtualBox:~/dev_pros/mysql_5$ sudo dpkg -i mysql-community-source_5.7.32-1ubuntu18.04_amd64.deb
Selecting previously unselected package mysql-community-source.
(Reading database ... 180471 files and directories currently installed.)
Preparing to unpack mysql-community-source_5.7.32-1ubuntu18.04_amd64.deb ...
Unpacking mysql-community-source (5.7.32-1ubuntu18.04) ...
Setting up mysql-community-source (5.7.32-1ubuntu18.04) ...
nanzhan@nanzhan-VirtualBox:~/dev_pros/mysql_5$
nanzhan@nanzhan-VirtualBox:~/dev_pros/mysql_5$ sudo dpkg -i mysql-community-server_5.7.32-1ubuntu18.04_amd64.deb
Selecting previously unselected package mysql-community-server.
(Reading database ... 180481 files and directories currently installed.)
Preparing to unpack mysql-community-server_5.7.32-1ubuntu18.04_amd64.deb ...
Unpacking mysql-community-server (5.7.32-1ubuntu18.04) ...
dpkg: dependency problems prevent configuration of mysql-community-server:
mysql-community-server depends on libmecab2; however:
Package libmecab2 is not installed.
dpkg: error processing package mysql-community-server (--install):
dependency problems - leaving unconfigured
Processing triggers for systemd (245.4-4ubuntu3.15) ...
Processing triggers for man-db (2.9.1-1) ...
Errors were encountered while processing:
mysql-community-server
nanzhan@nanzhan-VirtualBox:~/dev_pros/mysql_5$ sudo apt-get update
Hit:1 http://security.ubuntu.com/ubuntu focal-security InRelease
Hit:2 http://cn.archive.ubuntu.com/ubuntu focal InRelease
Hit:3 http://cn.archive.ubuntu.com/ubuntu focal-updates InRelease
Get:4 http://cn.archive.ubuntu.com/ubuntu focal-backports InRelease [108 kB]
Fetched 108 kB in 33s (3,275 B/s)
Reading package lists... Done
nanzhan@nanzhan-VirtualBox:~/dev_pros/mysql_5$ sudo dpkg -i mysql-community-server_5.7.32-1ubuntu18.04_amd64.deb
(Reading database ... 180643 files and directories currently installed.)
Preparing to unpack mysql-community-server_5.7.32-1ubuntu18.04_amd64.deb ...
.
Unpacking mysql-community-server (5.7.32-1ubuntu18.04) over (5.7.32-1ubuntu18.04) ...
dpkg: dependency problems prevent configuration of mysql-community-server:
mysql-community-server depends on libmecab2; however:
Package libmecab2 is not installed.
dpkg: error processing package mysql-community-server (--install):
dependency problems - leaving unconfigured
Processing triggers for systemd (245.4-4ubuntu3.15) ...
Processing triggers for man-db (2.9.1-1) ...
Errors were encountered while processing:
mysql-community-server
nanzhan@nanzhan-VirtualBox:~/dev_pros/mysql_5$
nanzhan@nanzhan-VirtualBox:~/dev_pros/mysql_5$ sudo apt-get install libmecab2
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
libmecab2
0 upgraded, 1 newly installed, 0 to remove and 277 not upgraded.
1 not fully installed or removed.
Need to get 233 kB of archives.
After this operation, 1,865 kB of additional disk space will be used.
Get:1 http://cn.archive.ubuntu.com/ubuntu focal/main amd64 libmecab2 amd64 0.996-10build1 [233 kB]
Fetched 233 kB in 11s (21.1 kB/s)
Selecting previously unselected package libmecab2:amd64.
(Reading database ... 180643 files and directories currently installed.)
Preparing to unpack .../libmecab2_0.996-10build1_amd64.deb ...
Unpacking libmecab2:amd64 (0.996-10build1) ...
Setting up libmecab2:amd64 (0.996-10build1) ...
Setting up mysql-community-server (5.7.32-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.
Processing triggers for libc-bin (2.31-0ubuntu9.2) ...
Processing triggers for systemd (245.4-4ubuntu3.15) ...
nanzhan@nanzhan-VirtualBox:~/dev_pros/mysql_5$
nanzhan@nanzhan-VirtualBox:~/dev_pros/mysql_5$ mysql -uroot -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.7.32 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> show tables
-> ;
ERROR 1046 (3D000): No database selected
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| performance_schema |
| sys |
+--------------------+
4 rows in set (0.00 sec)
mysql> exit;
Bye
nanzhan@nanzhan-VirtualBox:~/dev_pros/mysql_5$ ls
In addition, an error was reported when installing client, which i handled in another terminal,which is recorded as follows:
nanzhan@nanzhan-VirtualBox:~/dev_pros/libaio$ sudo apt-get install libaio1
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
mysql-community-client : Depends: libtinfo5 (>= 6) but it is not going to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
nanzhan@nanzhan-VirtualBox:~/dev_pros/libaio$
nanzhan@nanzhan-VirtualBox:~/dev_pros/libaio$
nanzhan@nanzhan-VirtualBox:~/dev_pros/libaio$ apt --fix-broken install
E: Could not open lock file /var/lib/dpkg/lock-frontend - open (13: Permission denied)
E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), are you root?
nanzhan@nanzhan-VirtualBox:~/dev_pros/libaio$ sudo apt-get install libtinfo5
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
mysql-community-client : Depends: libaio1 (>= 0.3.93) but it is not going to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
nanzhan@nanzhan-VirtualBox:~/dev_pros/libaio$ sudo apt-get install libmecab2
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
mysql-community-client : Depends: libaio1 (>= 0.3.93) but it is not going to be installed
Depends: libtinfo5 (>= 6) but it is not going to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
nanzhan@nanzhan-VirtualBox:~/dev_pros/libaio$ apt --fix-broken install
E: Could not open lock file /var/lib/dpkg/lock-frontend - open (13: Permission denied)
E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), are you root?
nanzhan@nanzhan-VirtualBox:~/dev_pros/libaio$ sudo apt --fix-broken install
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following additional packages will be installed:
libaio1 libtinfo5
The following NEW packages will be installed:
libaio1 libtinfo5
0 upgraded, 2 newly installed, 0 to remove and 276 not upgraded.
1 not fully installed or removed.
Need to get 90.2 kB of archives.
After this operation, 570 kB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Get:1 http://cn.archive.ubuntu.com/ubuntu focal/main amd64 libaio1 amd64 0.3.112-5 [7,184 B]
Get:2 http://cn.archive.ubuntu.com/ubuntu focal/universe amd64 libtinfo5 amd64 6.2-0ubuntu2 [83.0 kB]
Fetched 90.2 kB in 4s (22.1 kB/s)
Selecting previously unselected package libaio1:amd64.
(Reading database ... 180453 files and directories currently installed.)
Preparing to unpack .../libaio1_0.3.112-5_amd64.deb ...
Unpacking libaio1:amd64 (0.3.112-5) ...
Selecting previously unselected package libtinfo5:amd64.
Preparing to unpack .../libtinfo5_6.2-0ubuntu2_amd64.deb ...
Unpacking libtinfo5:amd64 (6.2-0ubuntu2) ...
Setting up libaio1:amd64 (0.3.112-5) ...
Setting up libtinfo5:amd64 (6.2-0ubuntu2) ...
Setting up mysql-community-client (5.7.32-1ubuntu18.04) ...
Processing triggers for libc-bin (2.31-0ubuntu9.2) ...
nanzhan@nanzhan-VirtualBox:~/dev_pros/libaio$
also if you met error like this , you can follow this:
error: dpkg frontend is locked by another process
https://blog.youkuaiyun.com/sexyluna/article/details/105616243