**Please, I really need help for this :( Thank you so much for any effort you guys
tried to help me**
At first, I wanted to install Jaxws, however the system recommended me doing `apt
--fix-broken install` because of an error. The mysql went conflict and dependencies
problem, so I tried to **clean uninstall** by doing this.
(Anyway, sorry for bad timestamp. By the time writing this, I also did some changes
so that I think it would make easier to figure out what's going on)
1. Show dpkg list for MySQL and MariaDB (empty already on this log), then remove
each of them
```
emp10@EMP10:~$ dpkg -l | grep mariadb
emp10@EMP10:~$ dpkg -l | grep mysql
ii mysql-client-8.0 8.0.31-
0ubuntu0.20.04.2 amd64 MySQL database
client binaries
ii mysql-client-core-8.0 8.0.31-
0ubuntu0.20.04.2 amd64 MySQL database
core client binaries
ii mysql-common
1:10.3.37+maria~ubu1804 all MariaDB
database common files (e.g. /etc/mysql/my.cnf)
ii mysql-server 8.0.31-
0ubuntu0.20.04.2 all MySQL database
server (metapackage depending on the latest version)
ii mysql-server-8.0 8.0.31-
0ubuntu0.20.04.2 amd64 MySQL database
server binaries and system database setup
ii mysql-server-core-8.0 8.0.31-
0ubuntu0.20.04.2 amd64 MySQL database
server binaries
```
2. Purge MySQL packages and remove mysql folders
```
emp10@EMP10:~$ sudo apt purge mysql-server mysql-client mysql-common mysql-server-
core-* mysql-client-core-*
emp10@EMP10:~$ sudo rm -rf /etc/mysql /var/lib/mysql /var/log/mysql
emp10@EMP10:~$ sudo apt autoremove
emp10@EMP10:~$ sudo apt autoclean
```
3. Install MySQL server
```
emp10@EMP10:~$ sudo apt install mysql-server
...
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-server-8.0 (8.0.31-0ubuntu0.20.04.2) ...
update-alternatives: warning: forcing reinstallation of alternative
/etc/mysql/mysql.cnf because link group my.cnf is broken
update-alternatives: warning: not replacing /etc/mysql/my.cnf with a link
Renaming removed key_buffer and myisam-recover options (if present)
mysqld: Can't get stat of '/etc/mysql/mariadb.cnf' (OS errno 2 - No such file or
directory)
mysqld: [ERROR] Stopped processing the 'include' directive in file
/etc/mysql/my.cnf at line 187.
mysqld will log errors to /var/lib/mysql/EMP10.err
2022-12-01T03:09:34.628510Z 0 [ERROR] [MY-010946] [Server] Failed to start mysqld
daemon. Check mysqld error log.
Warning: Unable to start the server.
Setting up mysql-server (8.0.31-0ubuntu0.20.04.2) ...
Processing triggers for systemd (245.4-4ubuntu3.19) ...
Processing triggers for man-db (2.9.1-1) ...
Processing triggers for libc-bin (2.31-0ubuntu9.9) ...
```
4. Check MySQL status
```
emp10@EMP10:~$ sudo service mysql status
● mysql.service - MySQL Community Server
Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset:
enabled)
Active: activating (start) since Thu 2022-12-01 10:45:56 WIB; 730ms ago
Process: 200742 ExecStartPre=/usr/share/mysql/mysql-systemd-start pre
(code=exited, status=0/SUCCESS)
Main PID: 200750 (mysqld)
Status: "Server startup in progress"
Tasks: 13 (limit: 6878)
Memory: 236.2M
CGroup: /system.slice/mysql.service
└─200750 /usr/sbin/mysqld
Des 01 10:45:56 EMP10 systemd[1]: Starting MySQL Community Server...
Des 01 10:45:56 EMP10 mysql-systemd-start[200745]: my_print_defaults: Can't get
stat of '/etc/mysql/mariadb.cnf' (OS errno 2 - No such file or directory)
Des 01 10:45:56 EMP10 mysql-systemd-start[200745]: my_print_defaults: [ERROR]
Stopped processing the 'include' directive in file /etc/mysql/my.cnf at line 187.
Des 01 10:45:56 EMP10 mysqld[200750]: mysqld: Can't get stat of
'/etc/mysql/mariadb.cnf' (OS errno 2 - No such file or directory)
Des 01 10:45:56 EMP10 mysqld[200750]: mysqld: [ERROR] Stopped processing the
'include' directive in file /etc/mysql/my.cnf at line 187.
Des 01 10:45:57 EMP10 mysqld[200750]: 2022-12-01T03:45:57.240129Z 0 [Warning] [MY-
011068] [Server] The syntax 'expire-logs-days' is deprecated and will be removed in
a future release. Please use binlog_expire_logs_seconds instead.
Des 01 10:45:57 EMP10 mysqld[200750]: 2022-12-01T03:45:57.243028Z 0 [System] [MY-
010116] [Server] /usr/sbin/mysqld (mysqld 8.0.31-0ubuntu0.20.04.2) starting as
process 200750
Des 01 10:45:57 EMP10 mysqld[200750]: 2022-12-01T03:45:57.273459Z 1 [System] [MY-
013576] [InnoDB] InnoDB initialization has started.
```
5. Enable mysql.service load and restart MySQL service
```
emp10@EMP10:~$ sudo systemctl enable mysql
emp10@EMP10:~$ sudo service mysql restart
Job for mysql.service failed because the control process exited with error code.
See "systemctl status mysql.service" and "journalctl -xe" for details.
```
---
**Other Logs**
**1. sudo systemctl status mysql.service**
```
emp10@EMP10:~$ sudo systemctl status mysql.service
● mysql.service - MySQL Community Server
Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset:
enabled)
Active: activating (start) since Thu 2022-12-01 10:23:05 WIB; 768ms ago
Process: 192230 ExecStartPre=/usr/share/mysql/mysql-systemd-start pre
(code=exited, status=0/SUCCESS)
Main PID: 192238 (mysqld)
Status: "Server startup in progress"
Tasks: 13 (limit: 6878)
Memory: 234.9M
CGroup: /system.slice/mysql.service
└─192238 /usr/sbin/mysqld
Des 01 10:23:05 EMP10 systemd[1]: Starting MySQL Community Server...
Des 01 10:23:05 EMP10 mysql-systemd-start[192233]: my_print_defaults: Can't get
stat of '/etc/mysql/mariadb.cnf' (OS errno 2 - No such file or directory)
Des 01 10:23:05 EMP10 mysql-systemd-start[192233]: my_print_defaults: [ERROR]
Stopped processing the 'include' directive in file /etc/mysql/my.cnf at line 187.
Des 01 10:23:05 EMP10 mysqld[192238]: mysqld: Can't get stat of
'/etc/mysql/mariadb.cnf' (OS errno 2 - No such file or directory)
Des 01 10:23:05 EMP10 mysqld[192238]: mysqld: [ERROR] Stopped processing the
'include' directive in file /etc/mysql/my.cnf at line 187.
Des 01 10:23:05 EMP10 mysqld[192238]: 2022-12-01T03:23:05.779102Z 0 [Warning] [MY-
011068] [Server] The syntax 'expire-logs-days' is deprecated and will be removed in
a future release. Please use binlog_expire_logs_seconds instead.
Des 01 10:23:05 EMP10 mysqld[192238]: 2022-12-01T03:23:05.781980Z 0 [System] [MY-
010116] [Server] /usr/sbin/mysqld (mysqld 8.0.31-0ubuntu0.20.04.2) starting as
process 192238
Des 01 10:23:05 EMP10 mysqld[192238]: 2022-12-01T03:23:05.812428Z 1 [System] [MY-
013576] [InnoDB] InnoDB initialization has started.
```
**2. journalctl -xe**
```
emp10@EMP10:~$ journalctl -xe
Des 01 10:59:21 EMP10 mysqld[205592]: 2022-12-01T03:59:21.742054Z 0 [Warning] [MY-
013129] [Server] A message intended for a client cannot be sent there as no client-
session is attached. Therefore, we're sending the information to the error-log
instead: MY-003543 - The mysql.component table is missing or has an incorrect
definition.
Des 01 10:59:21 EMP10 mysqld[205592]: 2022-12-01T03:59:21.742700Z 0 [ERROR] [MY-
000067] [Server] unknown variable 'query_cache_limit=128K'.
Des 01 10:59:21 EMP10 mysqld[205592]: 2022-12-01T03:59:21.743042Z 0 [ERROR] [MY-
010119] [Server] Aborting
Des 01 10:59:24 EMP10 mysqld[205592]: 2022-12-01T03:59:24.773177Z 0 [System] [MY-
010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.31-
0ubuntu0.20.04.2) (Ubuntu).
Des 01 10:59:24 EMP10 systemd[1]: mysql.service: Main process exited, code=exited,
status=1/FAILURE
-- Subject: Unit process exited
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- An ExecStart= process belonging to unit mysql.service has exited.
--
-- The process' exit code is 'exited' and its exit status is 1.
Des 01 10:59:24 EMP10 systemd[1]: mysql.service: Failed with result 'exit-code'.
-- Subject: Unit failed
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- The unit mysql.service has entered the 'failed' state with result 'exit-code'.
Des 01 10:59:24 EMP10 systemd[1]: Failed to start MySQL Community Server.
-- Subject: A start job for unit mysql.service has failed
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- A start job for unit mysql.service has finished with a failure.
--
-- The job identifier is 283668 and the job result is failed.
Des 01 10:59:25 EMP10 systemd[1]: mysql.service: Scheduled restart job, restart
counter is at 305.
-- Subject: Automatic restarting of a unit has been scheduled
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- Automatic restarting of the unit mysql.service has been scheduled, as the result
for
-- the configured Restart= setting for the unit.
Des 01 10:59:25 EMP10 systemd[1]: Stopped MySQL Community Server.
-- Subject: A stop job for unit mysql.service has finished
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- A stop job for unit mysql.service has finished.
--
-- The job identifier is 283753 and the job result is done.
Des 01 10:59:25 EMP10 systemd[1]: Starting MySQL Community Server...
-- Subject: A start job for unit mysql.service has begun execution
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- A start job for unit mysql.service has begun execution.
--
-- The job identifier is 283753.
Des 01 10:59:25 EMP10 mysqld[205683]: 2022-12-01T03:59:25.517077Z 0 [Warning] [MY-
011068] [Server] The syntax 'expire-logs-days' is deprecated and will be removed in
a future release. Please use binlog_expire_logs_seconds instead.
Des 01 10:59:25 EMP10 mysqld[205683]: 2022-12-01T03:59:25.519939Z 0 [System] [MY-
010116] [Server] /usr/sbin/mysqld (mysqld 8.0.31-0ubuntu0.20.04.2) starting as
process 205683
Des 01 10:59:25 EMP10 mysqld[205683]: 2022-12-01T03:59:25.559195Z 1 [System] [MY-
013576] [InnoDB] InnoDB initialization has started.
Des 01 10:59:28 EMP10 mysqld[205683]: 2022-12-01T03:59:28.432702Z 1 [System] [MY-
013577] [InnoDB] InnoDB initialization has ended.
Des 01 10:59:29 EMP10 mysqld[205683]: mysqld: Table 'mysql.plugin' doesn't exist
Des 01 10:59:29 EMP10 mysqld[205683]: 2022-12-01T03:59:29.359108Z 0 [ERROR] [MY-
010735] [Server] Could not open the mysql.plugin table. Please perform the MySQL
upgrade procedure.
Des 01 10:59:29 EMP10 mysqld[205683]: 2022-12-01T03:59:29.360695Z 0 [Warning] [MY-
010441] [Server] Failed to open optimizer cost constant tables
Des 01 10:59:29 EMP10 mysqld[205683]: 2022-12-01T03:59:29.361726Z 0 [Warning] [MY-
010441] [Server] Failed to open optimizer cost constant tables
Des 01 10:59:29 EMP10 mysqld[205683]: 2022-12-01T03:59:29.362850Z 0 [Warning] [MY-
010441] [Server] Failed to open optimizer cost constant tables
Des 01 10:59:29 EMP10 mysqld[205683]: 2022-12-01T03:59:29.364366Z 0 [Warning] [MY-
010441] [Server] Failed to open optimizer cost constant tables
Des 01 10:59:29 EMP10 mysqld[205683]: 2022-12-01T03:59:29.365403Z 0 [Warning] [MY-
010441] [Server] Failed to open optimizer cost constant tables
Des 01 10:59:29 EMP10 mysqld[205683]: 2022-12-01T03:59:29.366490Z 0 [Warning] [MY-
010441] [Server] Failed to open optimizer cost constant tables
Des 01 10:59:29 EMP10 mysqld[205683]: 2022-12-01T03:59:29.367422Z 0 [Warning] [MY-
010441] [Server] Failed to open optimizer cost constant tables
Des 01 10:59:29 EMP10 mysqld[205683]: 2022-12-01T03:59:29.950306Z 0 [Warning] [MY-
010015] [Repl] Gtid table is not ready to be used. Table 'mysql.gtid_executed'
cannot be opened.
Des 01 10:59:30 EMP10 mysqld[205683]: 2022-12-01T03:59:30.243893Z 0 [Warning] [MY-
010015] [Repl] Gtid table is not ready to be used. Table 'mysql.gtid_executed'
cannot be opened.
Des 01 10:59:30 EMP10 mysqld[205683]: 2022-12-01T03:59:30.277992Z 0 [Warning] [MY-
010068] [Server] CA certificate ca.pem is self signed.
Des 01 10:59:30 EMP10 mysqld[205683]: 2022-12-01T03:59:30.278100Z 0 [System] [MY-
013602] [Server] Channel mysql_main configured to support TLS. Encrypted
connections are now supported for this channel.
Des 01 10:59:30 EMP10 mysqld[205683]: 2022-12-01T03:59:30.280235Z 0 [Warning] [MY-
010441] [Server] Failed to open optimizer cost constant tables
Des 01 10:59:30 EMP10 mysqld[205683]: 2022-12-01T03:59:30.281144Z 0 [ERROR] [MY-
013129] [Server] A message intended for a client cannot be sent there as no client-
session is attached. Therefore, we're sending the information to the error-log
instead: MY-001146 - Table 'mysql.component' doesn't exist
Des 01 10:59:30 EMP10 mysqld[205683]: 2022-12-01T03:59:30.281301Z 0 [Warning] [MY-
013129] [Server] A message intended for a client cannot be sent there as no client-
session is attached. Therefore, we're sending the information to the error-log
instead: MY-003543 - The mysql.component table is missing or has an incorrect
definition.
Des 01 10:59:30 EMP10 mysqld[205683]: 2022-12-01T03:59:30.281905Z 0 [ERROR] [MY-
000067] [Server] unknown variable 'query_cache_limit=128K'.
Des 01 10:59:30 EMP10 mysqld[205683]: 2022-12-01T03:59:30.282278Z 0 [ERROR] [MY-
010119] [Server] Aborting
```
---
**What I also tried (debugging)**
1. Create empty `/etc/mysql/mariadb.cnf`
```
/etc/mysql/mariadb.cnf
```
2. Run `sudo systemctl status mysql.service` again (3 times, the logs are
different)
```
emp10@EMP10:~$ sudo systemctl status mysql.service
● mysql.service - MySQL Community Server
Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset:
enabled)
Active: activating (start) since Thu 2022-12-01 10:55:20 WIB; 7s ago
Process: 204166 ExecStartPre=/usr/share/mysql/mysql-systemd-start pre
(code=exited, status=0/SUCCESS)
Main PID: 204174 (mysqld)
Status: "Server startup in progress"
Tasks: 31 (limit: 6878)
Memory: 302.1M
CGroup: /system.slice/mysql.service
└─204174 /usr/sbin/mysqld
Des 01 10:55:24 EMP10 mysqld[204174]: 2022-12-01T03:55:24.458269Z 0 [Warning] [MY-
010441] [Server] Failed to open optimizer cost constant tables
Des 01 10:55:26 EMP10 mysqld[204174]: 2022-12-01T03:55:26.220824Z 0 [Warning] [MY-
010015] [Repl] Gtid table is not ready to be used. Table 'mysql.gtid_executed'
cannot be opened.
Des 01 10:55:26 EMP10 mysqld[204174]: 2022-12-01T03:55:26.790651Z 0 [Warning] [MY-
010015] [Repl] Gtid table is not ready to be used. Table 'mysql.gtid_executed'
cannot be opened.
Des 01 10:55:26 EMP10 mysqld[204174]: 2022-12-01T03:55:26.824806Z 0 [Warning] [MY-
010068] [Server] CA certificate ca.pem is self signed.
Des 01 10:55:26 EMP10 mysqld[204174]: 2022-12-01T03:55:26.824946Z 0 [System] [MY-
013602] [Server] Channel mysql_main configured to support TLS. Encrypted
connections are now supported for this channel.
Des 01 10:55:26 EMP10 mysqld[204174]: 2022-12-01T03:55:26.827094Z 0 [Warning] [MY-
010441] [Server] Failed to open optimizer cost constant tables
Des 01 10:55:26 EMP10 mysqld[204174]: 2022-12-01T03:55:26.827891Z 0 [ERROR] [MY-
013129] [Server] A message intended for a client cannot be sent there as no client-
session is attached. Therefore, we're sending the information to the error-log
instead: MY-001146 - Table 'mysql.component' doesn't exist
Des 01 10:55:26 EMP10 mysqld[204174]: 2022-12-01T03:55:26.828002Z 0 [Warning] [MY-
013129] [Server] A message intended for a client cannot be sent there as no client-
session is attached. Therefore, we're sending the information to the error-log
instead: MY-003543 - The mysql.component table is missing or has an incorrect
definition.
Des 01 10:55:26 EMP10 mysqld[204174]: 2022-12-01T03:55:26.828655Z 0 [ERROR] [MY-
000067] [Server] unknown variable 'query_cache_limit=128K'.
Des 01 10:55:26 EMP10 mysqld[204174]: 2022-12-01T03:55:26.829013Z 0 [ERROR] [MY-
010119] [Server] Aborting
```
```
emp10@EMP10:~$ sudo systemctl status mysql.service
● mysql.service - MySQL Community Server
Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset:
enabled)
Active: activating (start) since Thu 2022-12-01 10:55:29 WIB; 2s ago
Process: 204221 ExecStartPre=/usr/share/mysql/mysql-systemd-start pre
(code=exited, status=0/SUCCESS)
Main PID: 204229 (mysqld)
Status: "Server startup in progress"
Tasks: 23 (limit: 6878)
Memory: 275.8M
CGroup: /system.slice/mysql.service
└─204229 /usr/sbin/mysqld
Des 01 10:55:29 EMP10 systemd[1]: Starting MySQL Community Server...
Des 01 10:55:29 EMP10 mysqld[204229]: 2022-12-01T03:55:29.497456Z 0 [Warning] [MY-
011068] [Server] The syntax 'expire-logs-days' is deprecated and will be removed in
a future release. Please use binlog_expire_logs_seconds instead.
Des 01 10:55:29 EMP10 mysqld[204229]: 2022-12-01T03:55:29.500328Z 0 [System] [MY-
010116] [Server] /usr/sbin/mysqld (mysqld 8.0.31-0ubuntu0.20.04.2) starting as
process 204229
Des 01 10:55:29 EMP10 mysqld[204229]: 2022-12-01T03:55:29.531539Z 1 [System] [MY-
013576] [InnoDB] InnoDB initialization has started.
```
```
emp10@EMP10:~$ sudo systemctl status mysql.service
● mysql.service - MySQL Community Server
Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset:
enabled)
Active: activating (start) since Thu 2022-12-01 10:55:38 WIB; 1s ago
Process: 204275 ExecStartPre=/usr/share/mysql/mysql-systemd-start pre
(code=exited, status=0/SUCCESS)
Main PID: 204283 (mysqld)
Status: "Server startup in progress"
Tasks: 23 (limit: 6878)
Memory: 274.7M
CGroup: /system.slice/mysql.service
└─204283 /usr/sbin/mysqld
Des 01 10:55:38 EMP10 systemd[1]: Starting MySQL Community Server...
Des 01 10:55:38 EMP10 mysqld[204283]: 2022-12-01T03:55:38.496770Z 0 [Warning] [MY-
011068] [Server] The syntax 'expire-logs-days' is deprecated and will be removed in
a future release. Please use binlog_expire_logs_seconds instead.
Des 01 10:55:38 EMP10 mysqld[204283]: 2022-12-01T03:55:38.499619Z 0 [System] [MY-
010116] [Server] /usr/sbin/mysqld (mysqld 8.0.31-0ubuntu0.20.04.2) starting as
process 204283
Des 01 10:55:38 EMP10 mysqld[204283]: 2022-12-01T03:55:38.535069Z 1 [System] [MY-
013576] [InnoDB] InnoDB initialization has started.
emp10@EMP10:~$ sudo systemctl status mysql.service
```
3. For `journalctl -xe` error (I think for mysql.components error), I comments some
lines on `/etc/mysql/my.cnf`
(based on
[https://github.com/gitpod-io/gitpod/issues/1399](https://www.stackoverflow.com/))
```
#query_cache_limit = 128K
#query_cache_size = 64M
#expire_logs_days = 10
#max_binlog_size = 100M
```
4. Run `sudo service mysql start`
```
emp10@EMP10:~$ sudo service mysql start
Job for mysql.service failed because the control process exited with error code.
See "systemctl status mysql.service" and "journalctl -xe" for details.
```
5. See `systemctl status mysql.service` and `journalctl -xe`
```
emp10@EMP10:~$ systemctl status mysql.service
● mysql.service - MySQL Community Server
Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset:
enabled)
Active: activating (start-pre) since Thu 2022-12-01 11:26:57 WIB; 50ms ago
Cntrl PID: 215656 (mysql-systemd-s)
Tasks: 3 (limit: 6878)
Memory: 11.7M
CGroup: /system.slice/mysql.service
├─215656 /bin/bash /usr/share/mysql/mysql-systemd-start pre
├─215662 /bin/bash /usr/share/mysql/mysql-systemd-start pre
└─215663 mysqld --verbose --help --innodb-read-only
Des 01 11:26:57 EMP10 systemd[1]: Starting MySQL Community Server...
```
```
emp10@EMP10:~$ journalctl -xe
Des 01 11:27:51 EMP10 mysqld[215927]: 2022-12-01T04:27:51.916188Z 0 [System] [MY-
010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.31-
0ubuntu0.20.04.2) (Ubuntu).
Des 01 11:27:51 EMP10 systemd[1]: mysql.service: Main process exited, code=exited,
status=1/FAILURE
-- Subject: Unit process exited
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- An ExecStart= process belonging to unit mysql.service has exited.
--
-- The process' exit code is 'exited' and its exit status is 1.
Des 01 11:27:51 EMP10 systemd[1]: mysql.service: Failed with result 'exit-code'.
-- Subject: Unit failed
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- The unit mysql.service has entered the 'failed' state with result 'exit-code'.
Des 01 11:27:51 EMP10 systemd[1]: Failed to start MySQL Community Server.
-- Subject: A start job for unit mysql.service has failed
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- A start job for unit mysql.service has finished with a failure.
--
-- The job identifier is 300159 and the job result is failed.
Des 01 11:27:52 EMP10 systemd[1]: mysql.service: Scheduled restart job, restart
counter is at 495.
-- Subject: Automatic restarting of a unit has been scheduled
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- Automatic restarting of the unit mysql.service has been scheduled, as the result
for
-- the configured Restart= setting for the unit.
Des 01 11:27:52 EMP10 systemd[1]: Stopped MySQL Community Server.
-- Subject: A stop job for unit mysql.service has finished
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- A stop job for unit mysql.service has finished.
--
-- The job identifier is 300244 and the job result is done.
Des 01 11:27:52 EMP10 systemd[1]: Starting MySQL Community Server...
-- Subject: A start job for unit mysql.service has begun execution
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- A start job for unit mysql.service has begun execution.
--
-- The job identifier is 300244.
Des 01 11:27:52 EMP10 mysqld[215978]: 2022-12-01T04:27:52.801507Z 0 [System] [MY-
010116] [Server] /usr/sbin/mysqld (mysqld 8.0.31-0ubuntu0.20.04.2) starting as
process 215978
Des 01 11:27:52 EMP10 mysqld[215978]: 2022-12-01T04:27:52.838390Z 1 [System] [MY-
013576] [InnoDB] InnoDB initialization has started.
Des 01 11:27:56 EMP10 mysqld[215978]: 2022-12-01T04:27:56.835576Z 1 [System] [MY-
013577] [InnoDB] InnoDB initialization has ended.
Des 01 11:27:57 EMP10 mysqld[215978]: mysqld: Table 'mysql.plugin' doesn't exist
Des 01 11:27:57 EMP10 mysqld[215978]: 2022-12-01T04:27:57.794572Z 0 [ERROR] [MY-
010735] [Server] Could not open the mysql.plugin table. Please perform the MySQL
upgrade procedure.
Des 01 11:27:57 EMP10 mysqld[215978]: 2022-12-01T04:27:57.796461Z 0 [Warning] [MY-
010441] [Server] Failed to open optimizer cost constant tables
Des 01 11:27:57 EMP10 mysqld[215978]: 2022-12-01T04:27:57.797693Z 0 [Warning] [MY-
010441] [Server] Failed to open optimizer cost constant tables
Des 01 11:27:57 EMP10 mysqld[215978]: 2022-12-01T04:27:57.798994Z 0 [Warning] [MY-
010441] [Server] Failed to open optimizer cost constant tables
Des 01 11:27:57 EMP10 mysqld[215978]: 2022-12-01T04:27:57.800732Z 0 [Warning] [MY-
010441] [Server] Failed to open optimizer cost constant tables
Des 01 11:27:57 EMP10 mysqld[215978]: 2022-12-01T04:27:57.801853Z 0 [Warning] [MY-
010441] [Server] Failed to open optimizer cost constant tables
Des 01 11:27:57 EMP10 mysqld[215978]: 2022-12-01T04:27:57.803016Z 0 [Warning] [MY-
010441] [Server] Failed to open optimizer cost constant tables
Des 01 11:27:57 EMP10 mysqld[215978]: 2022-12-01T04:27:57.804443Z 0 [Warning] [MY-
010441] [Server] Failed to open optimizer cost constant tables
```
6.
```
emp10@EMP10:~$ sudo systemctl stop mysql
emp10@EMP10:~$ sudo mkdir /var/run/mysqld
emp10@EMP10:~$ sudo chown mysql:mysql /var/run/mysqld
emp10@EMP10:~$ mysqld --upgrade=FORCE
```
7. Comment some lines again on `/etc/mysql/my.cnf` because `unknown variable`
errors like
```
2022-12-01T04:51:10.423138Z 0 [ERROR] [MY-000067] [Server] unknown variable
'log_slow_verbosity=query_plan'
```
```
#log_warnings = 2
#log_slow_verbosity = query_plan
```
Ubuntu 20.04