"... service 'mysqld' is currently down" but sites are still up?

jlpeifer

Verified User
Joined
Jun 6, 2006
Messages
106
I received an notification today "DirectAdmin has been updated to v1.673 with warnings". Details...
This is an automated message notifying you that DirectAdmin has been successfully updated with warnings.
v1.672 (e0c066c) to v1.673 (d60afd2)

Warning message:
/usr/local/directadmin/scripts/update.sh:
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

I follow the suggestion and run "apt --fix-broken install" and get this output...
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Correcting dependencies... Done
The following additional packages will be installed:
mariadb-server
Suggested packages:
mailx mariadb-test netcat-openbsd
The following NEW packages will be installed:
mariadb-server
0 upgraded, 1 newly installed, 0 to remove and 130 not upgraded.
6 not fully installed or removed.
Need to get 0 B/3,655 kB of archives.
After this operation, 55.2 MB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Preconfiguring packages ...
(Reading database ... 53321 files and directories currently installed.)
Preparing to unpack .../mariadb-server_1%3a10.11.6-0+deb12u1_amd64.deb ...
Failed to stop mariadb.service: Unit mariadb.service not loaded.
invoke-rc.d: initscript mariadb, action "stop" failed.
Failed to stop mysql.service: Unit mysql.service not loaded.
invoke-rc.d: initscript mysql, action "stop" failed.
Attempt to stop MariaDB/MySQL server returned exitcode 5
There is a MariaDB/MySQL server running, but we failed in our attempts to stop it.
Stop it yourself and try again!
dpkg: error processing archive /var/cache/apt/archives/mariadb-server_1%3a10.11.6-0+deb12u1_amd64.deb (--unpack):
new mariadb-server package pre-installation script subprocess returned error exit status 1
Errors were encountered while processing:
/var/cache/apt/archives/mariadb-server_1%3a10.11.6-0+deb12u1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

So I get into DA and stop the mysql service then run the "apt --fix-broken install" command again...
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Correcting dependencies... Done
The following additional packages will be installed:
mariadb-server
Suggested packages:
mailx mariadb-test netcat-openbsd
The following NEW packages will be installed:
mariadb-server
0 upgraded, 1 newly installed, 0 to remove and 130 not upgraded.
6 not fully installed or removed.
Need to get 0 B/3,655 kB of archives.
After this operation, 55.2 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Preconfiguring packages ...
(Reading database ... 53321 files and directories currently installed.)
Preparing to unpack .../mariadb-server_1%3a10.11.6-0+deb12u1_amd64.deb ...
Unpacking mariadb-server (1:10.11.6-0+deb12u1) ...
Setting up mariadb-server (1:10.11.6-0+deb12u1) ...
Created symlink /etc/systemd/system/multi-user.target.wants/mariadb.service → /lib/systemd/system/mariadb.service.
Setting up mariadb-plugin-provider-bzip2 (1:10.11.6-0+deb12u1) ...
Setting up mariadb-plugin-provider-lzma (1:10.11.6-0+deb12u1) ...
Setting up mariadb-plugin-provider-lzo (1:10.11.6-0+deb12u1) ...
Setting up mariadb-plugin-provider-lz4 (1:10.11.6-0+deb12u1) ...
Setting up mariadb-plugin-provider-snappy (1:10.11.6-0+deb12u1) ...
Setting up default-mysql-server (1.1.0) ...
Processing triggers for man-db (2.11.2-2) ...
Processing triggers for mariadb-server (1:10.11.6-0+deb12u1) ...

After doing this I start receiving notifications...
The service 'mysqld' on server server-blahblah.da.direct is currently down

Despite receiving this message all the websites I host that rely on mysql are working OK, but when I get into the DirectAdmin Control Panel and attempt to manage databases for a user I receive pop-up errors reading...
Internal Error: Failed to load databases list
and the message "! No databases found..." on the Dashboard > Databases page.

Can anyone tell me how to resolve this issue? Thanks.
 
Thanks. The content of the /etc/my.cnf file is...

[mysqld]
max_allowed_packet=64M
local-infile=0
innodb_file_per_table

[client]
socket=/usr/local/mysql/data/mysql.sock

How do I determine if "/usr/local/mysql/data/mysql.sock" is the correct path?
 
you broke the database system and shouldn't upgrade/modifier mysql via "APT".

the simple ways to solves the problem, just using custombuild.
Code:
da build mysql

Becarefully, it's already broken, so execute this command might remove all the database, you need to backup "/var/lib/mysql", "/usr/local/mysql" before do crazy things.
 
Last edited:
Thanks for the reply. Seems weird that DA (I guess it was DA) suggested, "Try 'apt --fix-broken install' with no packages" as a fix.

you broke the database system and shouldn't upgrade/modifier mysql via "APT".

the simple ways to solves the problem, just using custombuild.
Code:
da build mysql

Becarefully, it's already broken, so execute this command might remove all the database, you need to backup "/var/lib/mysql", "/var/local/mysql" before do crazy things.
 
Via SSH do:

Code:
ps aux | grep mysql

If you see a pid with mysql kill it and start mysqld.

I had this because of using MariaDB and the setup in symlinks seemed to have changed recently. So checking for any other sql service running on a pid worked for me
 
Back
Top