Forum Moderators: open

Message Too Old, No Replies

Problem in Mysql Config File

How can I solve "mysql.service: Failed with result 'exit-code'"

         

elvang

5:48 pm on May 7, 2022 (gmt 0)

Top Contributors Of The Month



When I apt update my server I am getting a warning for mysql. I did not change anything about mysql. And it started to give this warning itself. And now i can not apt update server. It is saying "unable to start server" I saw something about mysql config file but i am not sure the values in config file is creating problem. I also shared my mysql config file at the buttom.

This is the warning when i apt update/sudo apt-get upgrade -y the server:

Setting up mysql-server-8.0 (8.0.29-0ubuntu0.20.04.3) ...
mysqld will log errors to /var/log/mysql/error.log
2022-05-07T16:21:07.152151Z 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 the control process exited with error code.
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: exit-code) since Sat 2022-05-07 19:23:20 +03; 11ms ago
Process: 1513790 ExecStartPre=/usr/share/mysql/mysql-systemd-start pre (code=exited, status=0/SUCCESS)
Process: 1513813 ExecStart=/usr/sbin/mysqld (code=exited, status=1/FAILURE)
Main PID: 1513813 (code=exited, status=1/FAILURE)
Status: "Server upgrade complete"
Error: 2 (No such file or directory)

May 07 19:23:20 example.com systemd[1]: mysql.service: Main process exited, code=exited, status=1/FAILURE
May 07 19:23:20 example.com systemd[1]: mysql.service: Failed with result 'exit-code'.
May 07 19:23:20 example.com 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
No apport report written because the error message indicates its a followup error from a previous failure.
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
Errors were encountered while processing:
mysql-server-8.0
mysql-server
E: Sub-process /usr/bin/dpkg returned an error code (1)


This is my "systemctl status mysql.service":

● mysql.service - MySQL Community Server
Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled)
Active: activating (start) since Sat 2022-05-07 19:44:54 +03; 1min 46s ago
Process: 1517243 ExecStartPre=/usr/share/mysql/mysql-systemd-start pre (code=exited, status=0/SUCCESS)
Main PID: 1517251 (mysqld)
Status: "Server upgrade in progress"
Tasks: 28 (limit: 2274)
Memory: 1.5G
CGroup: /system.slice/mysql.service
└─1517251 /usr/sbin/mysqld

May 07 19:44:54 homelistt.com systemd[1]: Stopped MySQL Community Server.
May 07 19:44:54 homelistt.com systemd[1]: Starting MySQL Community Server...


And this is my error log:

2022-05-06T21:00:55.443981Z 0 [Warning] [MY-000081] [Server] option 'table_open_cache': unsigned value 33554432 adjusted to 524288.
2022-05-06T21:00:55.444030Z 0 [Warning] [MY-010139] [Server] Changed limits: max_open_files: 10000 (requested 1048661)
2022-05-06T21:00:55.444034Z 0 [Warning] [MY-010142] [Server] Changed limits: table_open_cache: 4957 (requested 524288)
2022-05-06T21:00:55.735981Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.29-0ubuntu0.20.04.3) starting as process 1339011
2022-05-06T21:00:55.745010Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2022-05-06T21:01:56.863636Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
2022-05-06T21:01:59.369277Z 4 [System] [MY-013381] [Server] Server upgrade from '80028' to '80029' started.
2022-05-06T21:02:41.873440Z 4 [ERROR] [MY-013178] [Server] Execution of server-side SQL statement '-- Copyright (c) 2015, 2021, Oracle and/or its affiliates. -- -- This program is free software; you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by -- the Free Software Foundation; version 2 of the License. -- -- This program is distributed in the hope that it will be useful, -- but WITHOUT ANY WARRANTY; without even the implied warranty of -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License -- along with this program; if not, write to the Free Software -- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -- NOTE: This needs to be replicated within the sys_config_clean.inc file INSERT IGNORE INTO sys.sys_config (variable, value) VALUES ('statement_truncate_len', 64), ('statement_performance_analyzer.limit', 100), ('statement_performance_analyzer.view', NULL), ('diagnostics.allow_i_s_tables', 'OFF'), ('diagnostics.include_raw', 'OFF'), ('ps_thread_trx_info.max_length', 65535); ' failed with error code = 1436, error message = 'Thread stack overrun: 12560 bytes used of a 131072 byte stack, and 160000 bytes needed. Use 'mysqld --thread_stack=#' to specify a bigger stack.'.
2022-05-06T21:02:41.882600Z 0 [ERROR] [MY-013380] [Server] Failed to upgrade server.
2022-05-06T21:02:41.883461Z 0 [ERROR] [MY-010119] [Server] Aborting
2022-05-06T21:02:42.811865Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.29-0ubuntu0.20.04.3) (Ubuntu).
2022-05-06T21:02:43.206570Z 0 [Warning] [MY-000081] [Server] option 'table_open_cache': unsigned value 33554432 adjusted to 524288.
2022-05-06T21:02:43.206627Z 0 [Warning] [MY-010139] [Server] Changed limits: max_open_files: 10000 (requested 1048661)
2022-05-06T21:02:43.206637Z 0 [Warning] [MY-010142] [Server] Changed limits: table_open_cache: 4957 (requested 524288)
2022-05-06T21:02:43.502566Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.29-0ubuntu0.20.04.3) starting as process 1339310
2022-05-06T21:02:43.514478Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2022-05-06T21:03:43.775350Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
2022-05-06T21:03:46.222153Z 4 [System] [MY-013381] [Server] Server upgrade from '80028' to '80029' started.
2022-05-06T21:04:28.715553Z 4 [ERROR] [MY-013178] [Server] Execution of server-side SQL statement '-- Copyright (c) 2015, 2021, Oracle and/or its affiliates. -- -- This program is free software; you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by -- the Free Software Foundation; version 2 of the License. -- -- This program is distributed in the hope that it will be useful, -- but WITHOUT ANY WARRANTY; without even the implied warranty of -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License -- along with this program; if not, write to the Free Software -- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -- NOTE: This needs to be replicated within the sys_config_clean.inc file INSERT IGNORE INTO sys.sys_config (variable, value) VALUES ('statement_truncate_len', 64), ('statement_performance_analyzer.limit', 100), ('statement_performance_analyzer.view', NULL), ('diagnostics.allow_i_s_tables', 'OFF'), ('diagnostics.include_raw', 'OFF'), ('ps_thread_trx_info.max_length', 65535); ' failed with error code = 1436, error message = 'Thread stack overrun: 12560 bytes used of a 131072 byte stack, and 160000 bytes needed. Use 'mysqld --thread_stack=#' to specify a bigger stack.'.
2022-05-06T21:04:28.725073Z 0 [ERROR] [MY-013380] [Server] Failed to upgrade server.
2022-05-06T21:04:28.725916Z 0 [ERROR] [MY-010119] [Server] Aborting
2022-05-06T21:04:29.708199Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.29-0ubuntu0.20.04.3) (Ubuntu).
2022-05-06T21:04:30.212038Z 0 [Warning] [MY-000081] [Server] option 'table_open_cache': unsigned value 33554432 adjusted to 524288.
2022-05-06T21:04:30.212089Z 0 [Warning] [MY-010139] [Server] Changed limits: max_open_files: 10000 (requested 1048661)
2022-05-06T21:04:30.212093Z 0 [Warning] [MY-010142] [Server] Changed limits: table_open_cache: 4957 (requested 524288)
2022-05-06T21:04:30.523494Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.29-0ubuntu0.20.04.3) starting as process 1339601
2022-05-06T21:04:30.534507Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2022-05-06T21:05:32.229568Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
2022-05-06T21:05:34.823888Z 4 [System] [MY-013381] [Server] Server upgrade from '80028' to '80029' started.
2022-05-06T21:06:16.501650Z 4 [ERROR] [MY-013178] [Server] Execution of server-side SQL statement '-- Copyright (c) 2015, 2021, Oracle and/or its affiliates. -- -- This program is free software; you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by -- the Free Software Foundation; version 2 of the License. -- -- This program is distributed in the hope that it will be useful, -- but WITHOUT ANY WARRANTY; without even the implied warranty of -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License -- along with this program; if not, write to the Free Software -- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -- NOTE: This needs to be replicated within the sys_config_clean.inc file INSERT IGNORE INTO sys.sys_config (variable, value) VALUES ('statement_truncate_len', 64), ('statement_performance_analyzer.limit', 100), ('statement_performance_analyzer.view', NULL), ('diagnostics.allow_i_s_tables', 'OFF'), ('diagno:


This is my "journalctl -xe"

-- Logs begin at Thu 2022-04-07 20:35:45 +03, end at Sat 2022-05-07 17:39:13 +03. --
Apr 07 20:35:45 localhost systemd[19872]: Reached target Paths.
Apr 07 20:35:45 localhost systemd[19872]: Reached target Timers.
Apr 07 20:35:45 localhost systemd[19872]: Starting D-Bus User Message Bus Socket.
Apr 07 20:35:45 localhost systemd[19872]: Listening on GnuPG network certificate management daemon.
Apr 07 20:35:45 localhost systemd[19872]: Listening on GnuPG cryptographic agent and passphrase cache (access for web browsers).
Apr 07 20:35:45 localhost systemd[19872]: Listening on GnuPG cryptographic agent and passphrase cache (restricted).
Apr 07 20:35:45 localhost systemd[19872]: Listening on GnuPG cryptographic agent (ssh-agent emulation).
Apr 07 20:35:45 localhost systemd[19872]: Listening on GnuPG cryptographic agent and passphrase cache.
Apr 07 20:35:45 localhost systemd[19872]: Listening on debconf communication socket.
Apr 07 20:35:45 localhost systemd[19872]: Listening on REST API socket for snapd user session agent.
Apr 07 20:35:45 localhost systemd[19872]: Listening on D-Bus User Message Bus Socket.
Apr 07 20:35:45 localhost systemd[19872]: Reached target Sockets.
Apr 07 20:35:45 localhost systemd[19872]: Reached target Basic System.
Apr 07 20:35:45 localhost systemd[19872]: Reached target Main User Target.
Apr 07 20:35:45 localhost systemd[19872]: Startup finished in 82ms.
Apr 07 22:05:26 localhost systemd[19872]: Stopped target Main User Target.
Apr 07 22:05:26 localhost systemd[19872]: Stopped target Basic System.
Apr 07 22:05:26 localhost systemd[19872]: Stopped target Paths.
Apr 07 22:05:26 localhost systemd[19872]: Stopped target Sockets.
Apr 07 22:05:26 localhost systemd[19872]: Stopped target Timers.
Apr 07 22:05:26 localhost systemd[19872]: dbus.socket: Succeeded.
Apr 07 22:05:26 localhost systemd[19872]: Closed D-Bus User Message Bus Socket.
Apr 07 22:05:26 localhost systemd[19872]: dirmngr.socket: Succeeded.
Apr 07 22:05:26 localhost systemd[19872]: Closed GnuPG network certificate management daemon.
Apr 07 22:05:26 localhost systemd[19872]: gpg-agent-browser.socket: Succeeded.
Apr 07 22:05:26 localhost systemd[19872]: Closed GnuPG cryptographic agent and passphrase cache (access for web browsers).
Apr 07 22:05:26 localhost systemd[19872]: gpg-agent-extra.socket: Succeeded.
Apr 07 22:05:26 localhost systemd[19872]: Closed GnuPG cryptographic agent and passphrase cache (restricted).
Apr 07 22:05:26 localhost systemd[19872]: gpg-agent-ssh.socket: Succeeded.
Apr 07 22:05:26 localhost systemd[19872]: Closed GnuPG cryptographic agent (ssh-agent emulation).
Apr 07 22:05:26 localhost systemd[19872]: gpg-agent.socket: Succeeded.
Apr 07 22:05:26 localhost systemd[19872]: Closed GnuPG cryptographic agent and passphrase cache.
Apr 07 22:05:26 localhost systemd[19872]: pk-debconf-helper.socket: Succeeded.
Apr 07 22:05:26 localhost systemd[19872]: Closed debconf communication socket.
Apr 07 22:05:26 localhost systemd[19872]: snapd.session-agent.socket: Succeeded.
Apr 07 22:05:26 localhost systemd[19872]: Closed REST API socket for snapd user session agent.
Apr 07 22:05:26 localhost systemd[19872]: Reached target Shutdown.
Apr 07 22:05:26 localhost systemd[19872]: systemd-exit.service: Succeeded.
Apr 07 22:05:26 localhost systemd[19872]: Finished Exit the Session.
Apr 07 22:05:26 localhost systemd[19872]: Reached target Exit the Session.
Apr 08 23:09:32 localhost systemd[43295]: Reached target Paths.
Apr 08 23:09:32 localhost systemd[43295]: Reached target Timers.
Apr 08 23:09:32 localhost systemd[43295]: Starting D-Bus User Message Bus Socket.
Apr 08 23:09:32 localhost systemd[43295]: Listening on GnuPG network certificate management daemon.
Apr 08 23:09:32 localhost systemd[43295]: Listening on GnuPG cryptographic agent and passphrase cache (access for web browsers).
Apr 08 23:09:32 localhost systemd[43295]: Listening on GnuPG cryptographic agent and passphrase cache (restricted).
Apr 08 23:09:32 localhost systemd[43295]: Listening on GnuPG cryptographic agent (ssh-agent emulation).
Apr 08 23:09:32 localhost systemd[43295]: Listening on GnuPG cryptographic agent and passphrase cache.


This is my mysql config file:

#
# The MySQL database server configuration file.
#
# You can copy this to one of:
# - "/etc/mysql/my.cnf" to set global options,
# - "~/.my.cnf" to set user-specific options.
#
# One can use all long options that the program supports.
# Run program with --help to get a list of available options and with
# --print-defaults to see which it would actually understand and use.
#
# For explanations see
# http://dev.mysql.com/doc/mysql/en/server-system-variables.html

#
# * IMPORTANT: Additional settings that can override those from this file!
# The files must end with '.cnf', otherwise they'll be ignored.
#

!includedir /etc/mysql/conf.d/
!includedir /etc/mysql/mysql.conf.d/
[mysqld]
max_allowed_packet = 1M
thread_stack = 128K
max_connections = 75
table_open_cache = 32M
key_buffer_size = 32M

Brett_Tabke

8:38 pm on Jun 18, 2022 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



Sorry no one was able to answer this - did you ever get it working?

Nothing really jumps out as the culprit there. Is there a control panel on there that could be conflicting with the update?