[SOLVED] after upgrade to deb10 mysql is playing up
Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I upgraded from Debian 8 to 9 then to 10. Now I'm getting problems with mysql. I've tried completly removing it at reinstalling, but I'm getting the same problem. Any suggestions what could be wrong would be welcome (I've tried the obvious and I can use google so tried the to 20 on there as well)
Code:
root@gdserver:/etc/systemd/system# systemctl start mysqld.service
Failed to start mysqld.service: Unit mysqld.service not found.
root@gdserver:/etc/systemd/system# systemctl status mysql.service
● mysql.service - LSB: Start and stop the mysql database server daemon
* *Loaded: loaded (/etc/init.d/mysql; generated)
* *Active: failed (Result: exit-code) since Tue 2019-11-12 20:24:42 GMT; 1min 2s ago
* * *Docs: man:systemd-sysv-generator(8)
* Process: 13932 ExecStart=/etc/init.d/mysql start (code=exited, status=1/FAILURE)
Nov 12 20:24:42 gdserver mysql[13932]: Fatal error in defaults handling. Program aborted
Nov 12 20:24:42 gdserver /etc/init.d/mysql[25629]: 0 processes alive and '/usr/bin/mysqladmin --defaults-file=/etc/mysql/debian.cnf ping' resulted in
Nov 12 20:24:42 gdserver /etc/init.d/mysql[25629]: [61B blob data]
Nov 12 20:24:42 gdserver /etc/init.d/mysql[25629]: error: 'Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)'
Nov 12 20:24:42 gdserver /etc/init.d/mysql[25629]: Check that mysqld is running and that the socket: '/var/run/mysqld/mysqld.sock' exists!
Nov 12 20:24:42 gdserver /etc/init.d/mysql[25629]:
Nov 12 20:24:42 gdserver mysql[13932]: *failed!
Nov 12 20:24:42 gdserver systemd[1]: mysql.service: Control process exited, code=exited, status=1/FAILURE
Nov 12 20:24:42 gdserver systemd[1]: mysql.service: Failed with result 'exit-code'.
Nov 12 20:24:42 gdserver systemd[1]: Failed to start LSB: Start and stop the mysql database server daemon.
The defaults bit is new - something I seem to have introduced, before that I was just getting the
Code:
'Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)'
root@gdserver:~# mysqld --help --verbose
mysqld: Can't read dir of '/etc/mysql/mariadb.conf.d/' (Errcode: 13 "Permission denied")
Fatal error in defaults handling. Program aborted
you upgraded from 8 to 9 to 10
you do not mention over what timespan
can I assume it was 8 and is now 10 in a very short timespan?
or is this something that has happened over years?
is there anything in the 8 and 10 release documentation that points out that configuration for mysql has changed?
your initial error has been truncated
Quote:
...ql/debian.cnf ping' resulted in ?????????????
the missing part may be an exit code, which could help diagnose the problem
anyone can use a web search, but garbage in garbage out
it's a law
And blindly following "destructions" the top 20 search results is asking for trouble.
Also, not telling us what you did to further break things is not going to help matters.
So the full(er) story. Server had be languishing at Debian 8 for far too long and for various reasons needed an update. So it went from Debian 8 at around 5pm to Debian 10 by around 9pm with a brief stop at Debian 9 along the way.
There was an old mysql installation, but when I cam to install NextCloud, I removed the mysql and reinstalled with MariaDb. Initially the DB started but after the recent reboot it's now failing to start. I din't notice the log line was truncated - I'll post the untruncated version later when I get home.
From what I can see at the moment, it's failing to start as it can read the config file. I've no idea why and wasn't able to find anything useful.
The /etc/myql folder and everything in it are at the root:root with perms of 755. I have also tried mysql:mysql and mysql:root.
If I set it to 777 I don't get the permission denied error - I get the writable config file error.
root@gdserver:/etc/mysql# cat /etc/apparmor.d/usr.sbin.mysqld
# This file is intensionally empty to disable apparmor by default for newer
# versions of MariaDB, while providing seamless upgrade from older versions
# and from mysql, where apparmor is used.
#
# By default, we do not want to have any apparmor profile for the MariaDB
# server. It does not provide much useful functionality/security, and causes
# several problems for users who often are not even aware that apparmor
# exists and runs on their system.
#
# Users can modify and maintain their own profile, and in this case it will
# be used.
#
# When upgrading from previous version, users who modified the profile
# will be promptet to keep or discard it, while for default installs
# we will automatically disable the profile.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.