after upgrade to deb10 mysql is playing up
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 Code:
'Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)' |
Also should add this was all working fine until I did a reboot.
|
even running as root I get
Code:
root@gdserver:~# mysqld --help --verbose |
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:
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. |
please don't set 777
thankfully the mysql binaries are hardcoded to fail when they see files with stupid permissions, be thankful someone is protecting you from yourself. set the correct permissions / owner Code:
find /etc/mysql -type d | sudo xargs -r chmod 755 but at least a start. |
I know it shouldn't be 777 - it was an experiment to see if there were something else causing the issue. I found it odd that running
Code:
mysqld --help --verbose The only thing in your suggestion I haven't tried is chmod 755 /etc/mysql/debian-start Unfortunatly the company firewall prevents me for getting onto the box while as work. Will test this when home this evening. |
Code:
root@gdserver:/etc/mysql# ls -al /etc/mysql Code:
Nov 14 18:22:36 gdserver audit[9322]: AVC apparmor="DENIED" operation="open" profile="/usr/sbin/mysqld" name="/etc/mysql/mariadb.conf.d/" pid=9322 comm="mysqld" requested_mask="r" denied_mask="r" fsuid=0 Code:
root@gdserver:/etc/mysql# cat /etc/apparmor.d/usr.sbin.mysqld |
This appears to be an issue with AppArmor and the MariaDb
see this thread for the solution. Theonly thing it doesn't say explicitly is you need to reboot. For those in too much of a rush to click... Code:
$ sudo systemctl stop apparmor.service |
All times are GMT -5. The time now is 11:01 PM. |