5

everyone! I have problem with installing mysql 8.0 server on linux ubuntu server 20.04.2 LTS.

I need to install this type of mysql-server 8.0.23 on linux ubuntu server 20.04.2 LTS!

I have tried:

  1. https://www.youtube.com/watch?v=pQoUvmtq3_U&ab_channel=BeGeek
  2. ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
  3. https://askubuntu.com/questions/643251/having-trouble-installing-and-removing-mysql-in-ubuntu
  4. https://askubuntu.com/questions/1267636/cant-install-mysql-server-on-ubuntu-20-04-1-due-to-several-errors
  5. MySQL my.cnf file - Found option without preceding group
  6. https://askubuntu.com/questions/797312/either-mysql-wont-start-or-the-client-shows-error-found-option-without-precedi
  7. https://serverfault.com/questions/305053/mysqld-sock-doesnt-exist
  8. https://unix.stackexchange.com/questions/33433/font-encoding-in-terminal
  9. https://linuxhint.com/install_mysql_ubuntu_2004/
  10. and I have tried create file which is missing - that's not helped either way

I have new VDS with pure ubuntu server 20.04.2 LTS, is nothing there.

log: putty

Building dependency tree
Reading state information... Done
mysql-server is already the newest version (8.0.25-0ubuntu0.20.04.1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
2 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Setting up mysql-server-8.0 (8.0.25-0ubuntu0.20.04.1) ...
Renaming removed key_buffer and myisam-recover options (if present)
mysqld will log errors to /var/log/mysql/error.log
2021-07-11T10:29:44.109433Z 0 [ERROR] [MY-011065] [Server] Unable to determine if daemon is running: No such file or directory (rc=0).
2021-07-11T10:29:44.117954Z 0 [ERROR] [MY-010946] [Server] Failed to start mysqld daemon. Check mysqld error log.
Warning: Unable to start the server.
Job for mysql.service failed because a fatal signal was delivered to the control process.
See "systemctl status mysql.service" and "journalctl -xe" for details.
invoke-rc.d: initscript mysql, action "start" failed.
● mysql.service - MySQL Community Server
     Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled)
     Active: activating (auto-restart) (Result: signal) since Sun 2021-07-11 13:29:46 MSK; 44ms ago
    Process: 10254 ExecStartPre=/usr/share/mysql/mysql-systemd-start pre (code=exited, status=0/SUCCESS)
    Process: 10271 ExecStart=/usr/sbin/mysqld (code=killed, signal=KILL)
   Main PID: 10271 (code=killed, signal=KILL)
     Status: "Server startup in progress"

Jul 11 13:29:46 vm2107059480 systemd[1]: mysql.service: Main process exited, code=killed, status=9/KILL
Jul 11 13:29:46 vm2107059480 systemd[1]: mysql.service: Failed with result 'signal'.
Jul 11 13:29:46 vm2107059480 systemd[1]: Failed to start MySQL Community Server.
dpkg: error processing package mysql-server-8.0 (--configure):
 installed mysql-server-8.0 package post-installation script subprocess returned error exit status 1
dpkg: dependency problems prevent configuration of mysql-server:
 mysql-server depends on mysql-server-8.0; however:
  Package mysql-server-8.0 is not configured yet.

dpkg: error processing package mysql-server (--configure):
 dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
                                                                                                          Errors were encountered while processing:
 mysql-server-8.0
 mysql-server
E: Sub-process /usr/bin/dpkg returned an error code (1)

log: /var/log/mysql/error.log

2021-07-11T10:29:42.768169Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2021-07-11T10:29:46.023486Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.25-0ubuntu0.20.04.1) starting as process 10271
2021-07-11T10:29:46.151047Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2021-07-11T10:29:47.681827Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.25-0ubuntu0.20.04.1) starting as process 10290
2021-07-11T10:29:47.776960Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2021-07-11T10:29:53.765476Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.25-0ubuntu0.20.04.1) starting as process 10356
2021-07-11T10:29:58.511612Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2021-07-11T10:30:59.292200Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.25-0ubuntu0.20.04.1) starting as process 10386
2021-07-11T10:30:59.758603Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2021-07-11T10:31:01.640829Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.25-0ubuntu0.20.04.1) starting as process 10421
2021-07-11T10:31:01.695269Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2021-07-11T10:31:02.905736Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.25-0ubuntu0.20.04.1) starting as process 10443
2021-07-11T10:31:02.948849Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2021-07-11T10:31:04.145881Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.25-0ubuntu0.20.04.1) starting as process 10465
2021-07-11T10:31:04.183083Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2021-07-11T10:31:05.051672Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.25-0ubuntu0.20.04.1) starting as process 10487
2021-07-11T10:31:05.087005Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.

I'm trying figure this out several days. Is someone know what I doing wrong? Google doesn't helped me.

Amit Verma
  • 2,450
  • 2
  • 8
  • 21
K.Igor
  • 143
  • 1
  • 2
  • 10

1 Answers1

8

It works for me:

start swap.

dd if=/dev/zero of=/swapfile bs=1M count=1024
mkswap /swapfile
swapon /swapfile
docker start mysql