0

First of all when I try to install mysql server with sudo apt install mysql-server, it is stuck generally at the stage %81 and waiting last lines like below

mysqld will log errors to /var/log/mysql/error.log
mysqld is running as pid 12759
Created symlink /etc/systemd/system/multi-user.target.wants/mysql.service → /lib/systemd/system/mysql.service.

After throw error at %81 or whatever, it gives me error

Errors were encountered while processing:
 mysql-server-8.0
 mysql-server
E: Sub-process /usr/bin/dpkg returned an error code (1)

Then when I want to remove all to do this I struggle and do many things after remove everything then try to install again, but had the same problems. I could not install yet.


update-alternatives: using /etc/mysql/mysql.cnf to provide /etc/mysql/my.cnf (my.cnf) in auto mode
Renaming removed key_buffer and myisam-recover options (if present)
mysqld will log errors to /var/log/mysql/error.log
mysqld is running as pid 61198
Created symlink /etc/systemd/system/multi-user.target.wants/mysql.service → /lib/systemd/system/mysql.service.

Progress: [ 94%] [##################################################################################################################################.........] 

It's the log under /var/log/mysql/error.log (It's created when I try to install.):

2021-01-07T16:37:31.913172Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2021-01-07T16:37:33.162774Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
2021-01-07T16:37:36.489807Z 6 [Warning] [MY-010453] [Server] root@localhost is created with an empty password ! Please consider switching off the --initialize-insecure option.
2021-01-07T16:37:39.365949Z 6 [System] [MY-013172] [Server] Received SHUTDOWN from user boot. Shutting down mysqld (Version: 8.0.22-0ubuntu0.20.04.3).
2021-01-07T16:37:44.690155Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.22-0ubuntu0.20.04.3) starting as process 84654
2021-01-07T16:37:44.706661Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2021-01-07T16:37:44.926828Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
2021-01-07T16:37:45.027382Z 0 [ERROR] [MY-011292] [Server] Plugin mysqlx reported: 'Preparation of I/O interfaces failed, X Protocol won't be accessible'
2021-01-07T16:37:45.027520Z 0 [ERROR] [MY-011300] [Server] Plugin mysqlx reported: 'Setup of socket: '/var/run/mysqld/mysqlx.sock' failed, can't create lock file /var/run/mysqld/mysqlx.sock.lock'
2021-01-07T16:37:45.231071Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.
2021-01-07T16:37:45.231641Z 0 [System] [MY-013602] [Server] Channel mysql_main configured to support TLS. Encrypted connections are now supported for this channel.
2021-01-07T16:37:45.238549Z 0 [Warning] [MY-011810] [Server] Insecure configuration for --pid-file: Location '/tmp' in the path is accessible to all OS users. Consider choosing a different directory.
2021-01-07T16:37:45.277687Z 0 [System] [MY-010931] [Server] /usr/sbin/mysqld: ready for connections. Version: '8.0.22-0ubuntu0.20.04.3'  socket: '/tmp/tmp.X9qpBhmSHc/mysqld.sock'  port: 0  (Ubuntu).
2021-01-07T16:37:45.312794Z 0 [System] [MY-013172] [Server] Received SHUTDOWN from user <via user signal>. Shutting down mysqld (Version: 8.0.22-0ubuntu0.20.04.3).
2021-01-07T16:37:46.863139Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.22-0ubuntu0.20.04.3)  (Ubuntu).
2021-01-07T16:37:47.950414Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.22-0ubuntu0.20.04.3) starting as process 84719
2021-01-07T16:37:47.957833Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2021-01-07T16:37:48.187217Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
2021-01-07T16:37:48.275665Z 0 [ERROR] [MY-011300] [Server] Plugin mysqlx reported: 'Setup of socket: '/var/run/mysqld/mysqlx.sock' failed, can't create lock file /var/run/mysqld/mysqlx.sock.lock'
2021-01-07T16:37:48.275861Z 0 [System] [MY-011323] [Server] X Plugin ready for connections. Bind-address: '127.0.0.1' port: 33060
2021-01-07T16:37:48.388116Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.
2021-01-07T16:37:48.388695Z 0 [System] [MY-013602] [Server] Channel mysql_main configured to support TLS. Encrypted connections are now supported for this channel.
2021-01-07T16:37:48.397497Z 0 [Warning] [MY-011810] [Server] Insecure configuration for --pid-file: Location '/tmp' in the path is accessible to all OS users. Consider choosing a different directory.
2021-01-07T16:37:48.444139Z 7 [System] [MY-013172] [Server] Received SHUTDOWN from user boot. Shutting down mysqld (Version: 8.0.22-0ubuntu0.20.04.3).
2021-01-07T16:37:49.863113Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.22-0ubuntu0.20.04.3)  (Ubuntu).
2021-01-07T16:37:51.181843Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.22-0ubuntu0.20.04.3) starting as process 84873
2021-01-07T16:37:51.194900Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2021-01-07T16:37:51.406520Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
2021-01-07T16:37:51.504461Z 0 [System] [MY-011323] [Server] X Plugin ready for connections. Socket: /var/run/mysqld/mysqlx.sock
2021-01-07T16:37:51.619732Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.
2021-01-07T16:37:51.620324Z 0 [System] [MY-013602] [Server] Channel mysql_main configured to support TLS. Encrypted connections are now supported for this channel.
2021-01-07T16:37:51.647930Z 0 [System] [MY-010931] [Server] /usr/sbin/mysqld: ready for connections. Version: '8.0.22-0ubuntu0.20.04.3'  socket: '/var/run/mysqld/mysqld.sock'  port: 0  (Ubuntu).
5
  • Does this answer your question? E: Sub-process /usr/bin/dpkg returned an error code (1)
    – cmak.fr
    Jan 7, 2021 at 7:44
  • no its not. At the beginning i was install mysql server correctly then i take this error. mean time i can install any package with apt just im struggling with mysql server
    – yusuf
    Jan 7, 2021 at 10:18
  • dpkg: error processing package mysql-server (--configure): dependency problems - leaving unconfigured Errors were encountered while processing: mysql-server-8.0 mysql-server E: Sub-process /usr/bin/dpkg returned an error code (1)
    – yusuf
    Jan 7, 2021 at 10:18
  • Which version of Ubuntu are you trying to install MySQL on? Is it the desktop or server version? When the dependencies are being downloaded, are any of them not for mysql-server-8.0? They may have something like 5.7 on the end.
    – user1091774
    Jan 7, 2021 at 15:08
  • its for ubuntu 20.04, and server version 8.0. dependencies for mysql-server-8.0, i install mysql server with this cyberciti.biz/faq/…
    – yusuf
    Jan 7, 2021 at 16:11

1 Answer 1

0

If your system is low on memory it can result in the error you are experiencing during mysql installation. Check /var/log/syslog for out of memory error.

1

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .